Repository navigation
Conversation
Storage format 4: a store record, one directory per database, fail-closed opening, generations, JSONL segments with key-index checkpoints, paged field indexes, shard filters and packed R-trees. Every derived file is checked by a crc, and damage to one never changes an answer. noneDB.php stays one file, built from src/. The separate tool noneDB-migrate.php, built from migrate/, converts databases of every earlier version. Also: database-level locking, rollback of failed writes, crash recovery, key rotation, online backup and restore, metrics, durable mode on Linux, bounded memory over many segments. PHP 8.1 or newer. The test suites are rebuilt.
The fixture tool ran old releases with the error settings of the php.ini in use, and a notice of 1.4 on a key that isn't there stopped CI while it went to a log file here. Notices are off in those runs now, and what is left always reaches the tool. noneDB::VERSION is 4.0.0. PERFORMANCE.md says what was measured without names of earlier builds, and no longer names the disk or the system.
Windows replaces no file that is open and moves no directory with an open file in it. The writer of the global field index kept the old file open through its own rename, so on Windows the file was never replaced. It closes it first now, also when a damaged row makes the file again. The migration tool reads the files it has locked through their handles, since a lock keeps every other handle out. It drops the engine's lock handles before it publishes, and lets go of a lock before its file or directory moves. Tests: FileHandlesTest looks for an open handle at every rename, on every system. Paths, cd and the tests that need POSIX follow the system they run on. OPERATIONS.md says what a rotation does on Windows under a running process.
The migration tool compared paths with / only and took D:\... for a relative path, so on Windows a --backup-dir inside --dir wasn't refused. It compares them as the system does now. A file that is open can't be replaced there, nor can a new LOCK appear while a process has one: those tests run where that can happen. Under a lock a test reads the state record through the lock's handle.
Under a lock a test finds the handle in the lock registry, where a held lock is kept. The two paths of the config search order that were still compared with / go through resolvedDir().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
noneDB 4: a new engine and storage format. What changed:
CHANGES.md. Databases of earlier versions are converted by the separate toolnoneDB-migrate.php(docs/MIGRATION.md).CI: PHP 8.1 to 8.5 on Linux, PHP 8.2 and 8.4 on Windows.