Skip to content

noneDB 4.0.0 - #10

Merged
orhanayd merged 6 commits into
masterfrom
dev
Nov 1, 2026
Merged

orhanayd merged 6 commits into
masterfrom
dev

Conversation

@orhanayd

@orhanayd orhanayd commented Nov 1, 2026

Copy link
Copy Markdown
Owner

noneDB 4: a new engine and storage format. What changed: CHANGES.md. Databases of earlier versions are converted by the separate tool noneDB-migrate.php (docs/MIGRATION.md).

CI: PHP 8.1 to 8.5 on Linux, PHP 8.2 and 8.4 on Windows.

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().
@orhanayd
orhanayd merged commit dd3ea72 into master Nov 1, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant