Skip to content

v4.1.0

Latest

Choose a tag to compare

@orhanayd orhanayd released this 29 Nov 22:22
b64fd05

v4.1.0 (2026-11-30)

Atomic writes, transactions, rules and the query language of MongoDB

noneDB 4.1 adds what applications reach for most after find() and insert(): changes that read and write a record
under one lock (counters, upserts, job queues), transactions over several records and databases that hold when the
process is killed, rules the data must keep (unique values, a schema, expiry), and the query operators, paths,
aggregates and cursors of MongoDB, in the facade and the query builder alike. The storage format stays 4:
databases of noneDB 4.0.0 open as they are.

Two experiments on 4.0.0 show why. Four processes that each ran first() and then update(v + 1) 500 times ended
with 500 instead of 2000. Four processes that inserted 200 e-mails after an exists() check inserted 203 records.
With 4.1, increment() gives exactly 2000, and the upsert exactly 200 records.


Upgrading from 4.0.0 (read first)

There is nothing to migrate: replace noneDB.php. A database 4.0.0 wrote is opened as it is, and reading it
rewrites none of its data files. A write buffer a 4.0.0 process left behind is taken over too: the first read or
write flushes it into the data file, as 4.0.0 itself does. The released 4.0.0 and this version
take turns on the same files in tests/Differential/Release40CompatibilityTest.php.

  1. Stop every 4.0.0 process first, as for any new version. Above all, never let noneDB 4.0.0 write a
    database that has rules: it doesn't know them. It would write records that break them, switch the database to
    shards without its rules file, and back it up without it. checkIntegrity() of 4.1 finds such records.
  2. Field indexes of dotted names (address.city) are built again once, at their first use: their files
    say v 2. Every other index file is used as it is (a global spatial index is written again once, with the member
    lv: "Storage format and durability" below).
  3. Changed behaviour:
    • A process without opcache needs a memory_limit of at least 16M (OPERATIONS.md §10): 4.1.0 is larger,
      and PHP compiles the whole file at its first require. A find() and a sum() over 10,000 records in shards of
      100 ran at 12M with 4.0.0; with 4.1.0 they run at 12M with some PHP builds and not with others (measured: macOS
      PHP 8.4, Linux 8.1, 8.2 and 8.5 at 12M; Linux 8.3 needs more).
      With opcache, the process that compiles the file needs 22M.
    • The facade's filters take operators. A value whose keys all start with $ is a set of operators:
      find("users", ["age" => ['$gte' => 18]]) used to look for the array ['$gte' => 18]. To find such an array,
      write ['$eq' => [...]]. An unknown operator, or an array that mixes $ keys with others, throws
      InvalidArgumentException (it matched nothing before). ["key" => ['$gt' => 5]] compares the keys (before:
      the key 5). A list of keys (["key" => [1, 2]]) means what it did.
    • $or, $and and $nor at the top of a filter combine filters; they used to be field names. Every
      other name, also one starting with $, is still a field.
    • Dotted names are paths into nested arrays: in filters, sort(), select(), groupBy(), the
      aggregates, field indexes and writes. A record with a top-level field of that very name is read and written
      on that field, as before. So update with set ['a.b' => 1] writes b inside a when the record has no
      field a.b; so do removeFields(['a.b']) and getKeysFromFieldIndex().
    • insert() returns the keys: ["n" => 2, "keys" => [7, 8]]. A buffered insert gets its keys at the
      flush and returns ["n" => N].
    • Sums are exact. sum() adds integers exactly and returns an int while the sum fits in one (the
      query builder's sum() returned a float: 9007199254740993 came back as 9007199254740992.0); floats are
      added with a compensated sum (0.1 ten times is 1.0, it was 0.9999999999999999). avg() is always a
      float, in the facade too. A numeric string too large for a float ("1e400") is not a number. having()
      adds the same way.
    • An update writes only the records it changes. n is still the number of matching records; an update
      that changes nothing writes nothing (the generation and getDurability()['lastOperation'] stay).
    • Messages: an unknown update operator answers unknown update operator 'x' (4.0.0: Please check your update parameters); the unknown-operator message of filters lists the new operators; a query builder write with
      groupBy() names every write in its LogicException.
    • Reports: checkIntegrity() compares the global indexes of a sharded database too: one that would make a
      lookup skip a shard for a value or an area a record of the shard holds is an index mismatch (global field F,
      global spatial F; rebuildIndex() repairs it).
    • Reports: checkIntegrity() has a rules member, and its ok is false when the rules file can't be read
      or a record breaks a rule; getMetrics($db)['database'] has a rules member, and bytes.metadata counts the
      rules and ttl.next files. checkIntegrity() also has a transaction member (null unless a killed
      process left one).
  4. Transactions and noneDB 4.0.0. A database that a killed 4.1 process left inside a transaction (or a
    bulkWrite()) answers every call of 4.0.0 with MAINTENANCE_IN_PROGRESS until a 4.1 process has opened it.
    Never run migrateKey() of 4.0.0 on such a store: it clears that mark without undoing the transaction, and
    4.1 can then only report it (checkIntegrity(): transaction.state abandoned), not take it back
    (docs/OPERATIONS.md §9).

Atomic writes

  • Update operators in update(), the query builder's new modify(), upsert() and findOneAndUpdate(), and
    bulkWrite(): set, unset, rename, inc, mul, min, max, push (with $each, $slice),
    addToSet, pull (with $in), pop, setOnInsert (docs/API.md "update()"). Each matching record is read,
    changed and written under the database's exclusive lock. Overflowing integers, a number operator on a value
    that is no number, a path through a scalar refuse the write; the whole call is undone.
  • Upsert (update(..., ["upsert" => true]), builder upsert()): no match inserts one record built from the
    filter's equalities, setOnInsert and the operators.
  • increment() / decrement() in the facade and the builder.
  • findOneAndUpdate() / findOneAndDelete() (builder): the first record of the query, changed or deleted, and
    returned, under one lock: a job queue no two workers share.
  • bulkWrite(): inserts, updates and deletes in order under one lock; when one is refused or throws, all of
    them are undone, and when the process is killed half-way the next session undoes them (below).
  • noneDB::WRITE_REJECTED (3312): the RuntimeException code of a refused findOneAndUpdate() /
    findOneAndDelete(), and of every refused write inside a transaction; outside one the other writes answer the
    message in error.

Transactions

  • transaction($databases, $fn): the callback runs with every named database locked exclusively, and what it
    writes is committed together or not at all: when it throws, when a write is refused (which throws
    WRITE_REJECTED inside a transaction and leaves it rollback-only), and when the process is killed at any
    point. Reads inside see the transaction's own writes; the rules hold against them. The result is the
    callback's value (docs/API.md "Transactions").
  • Several databases commit at one moment. After a kill every database of a transaction is as before it or
    every one is as after it; the next session of any process, a read included, sees to that before it does
    anything else.
  • bulkWrite() is crash-atomic in the same way: after a kill the database holds all of its entries or none.
  • Refused inside a transaction (LogicException): a database that was not named, another store, a nested
    transaction, setRules(), the index methods, rebuildIndex(), compact(), convertToSharded(), dropDB(),
    backup(), restore(), key maintenance.
  • Reports: getDurability()['lastOperation'] of a transaction (op transaction, dbs,
    pendingRecovery); checkIntegrity() and getMetrics() show a pending transaction without touching it; the
    recovery log's txn-undo, transaction-rolled-back, transaction-completed, transaction-abandoned,
    transaction-discarded.
  • Limits:
    • Durable mode syncs a transaction three times at least (its journal, its data, its commit): a bulkWrite()
      of one entry costs three syncs there where the single call costs one (two in a sharded database); one of many entries costs far fewer
      than the single calls (1200 updates of one segment: 3 syncs, not 1200).
    • A transaction keeps every other process out of its databases while its callback runs; they fail with
      LOCK_FAILED after lockTimeout. Locks are not fair: readers that never stop can keep a writer waiting.
    • Calls that write several records outside transaction() (insert() of a list, update() and delete() by
      filter) may still leave a part of themselves when the process is killed.
    • Performance mode promises nothing after a power loss. The undo after the restart may cut lines written in
      the last seconds before it (they are kept in quarantine).
    • Undoing the transaction of a killed process copies what it had written to quarantine: time and disk in
      proportion to that.
    • In a database without shards the keys of rolled-back inserts are given again; a sharded one leaves them
      unused.
    • The journal rests on the assumption the state record already rests on: one write of at most 384 bytes at the
      start of a file reaches the disk whole or not at all (it lies within one sector).

Rules

setRules($db, ["unique" => [...], "schema" => [...], "ttl" => [...]]), getRules(), purgeExpired():

  • unique: no two records hold the same value (typed; null and missing values are free) at these paths;
    checked through field indexes under the write lock, so concurrent inserts never duplicate a value.
  • schema: required paths; per path type, enum, min/max, minLength/maxLength,
    minItems/maxItems, pattern; additional.
  • ttl: records expire at their time field plus seconds. purgeExpired() deletes them; writes purge what is
    due a part at a time (ttl.next remembers when). Reads don't hide expired records.
  • setRules() checks the existing records first and changes nothing when one breaks a new rule. The rules are a
    checksummed file of the database's generation: they go with backups, restores and the switch to shards. A
    damaged file stops writes (FORMAT_DAMAGED), never reads; checkIntegrity() reports records that break the
    rules. dropFieldIndex() refuses a field a rule uses.

Queries

  • The facade takes the builder's operators, and both take new ones: $all, $size, $elemMatch, $type,
    $mod, $not, and $or / $and / $nor inside a filter. $or and $and use field indexes; one plan for
    both APIs.
  • Field paths: address.city, tags.0 everywhere a field name is taken (spatial fields excepted: they stay
    top-level names, docs/SPATIAL.md).
  • aggregate(): several aggregates in one pass, per group with groupBy(), filtered by having(), sorted and
    sliced as rows; memory grows with the groups, not the records.
  • cursor() / chunk(): the records of a query a batch at a time, with no lock held while the caller works;
    each record at most once, none inserted after the start. With sort() the cursor keeps only the sort values and
    keys of the matches, and past a budget sorts them in runs on disk (PHP's temporary directory) that it merges: a
    sort of 1,000,000 records through a cursor runs at PHP's default memory_limit of 128M (peak 75 MiB), where
    sort()->get(), which returns them all, can't.

Writer priority

  • writerPriority (setting, off by default): a writer that waits for a database's lock stops new readers, so
    readers that scan without pause can't keep writers out until LOCK_FAILED (without it, and in 4.0.0, they can).
    4 writers among 8 nonstop readers of 3 000 records in 30 shards, 15 seconds: 3 writes committed and 9 timed out
    without it, 2 133 committed and none timed out with it. A turnstile per database, an empty file in
    .nonedb-maintenance/turnstile/ (STORAGE_FORMAT.md §4.2.2), costs two more flock() calls per operation while the
    setting is on (about 7.5 µs: a warm read of one record by key 22% slower); off, nothing of it runs. Every process
    that opens the store must use the same value
    (web workers, CLI scripts, cron and queue workers): readers without
    it pass a waiting writer, and the writers starve (4 writers with it, 8 readers without it: 4 writes committed in 15
    seconds, 8 timed out). noneDB 4.0.0 never looks at the files.

Performance (docs/PERFORMANCE.md §2, §3, §9)

  • Measured against the released 4.0.0 with the statistical performance gate, two runs of its 66 workloads on a quiet
    machine: 43 verified improvements, 21 without a verified change, no time regression. One finding: reading every record
    of 10,000 is 0.3–0.5 % slower. One memory verdict comes from a 64 KiB step of PHP's own memory at the gate's starting
    point; the operation holds 1,040 bytes more. On 10 million records the two are level.
  • The default settings execute fewer PHP instructions per read and write than 4.0.0: 10 % fewer for a find by key,
    9 % for an insert, 7 % for a delete, 2 % for an update (an index build 1.9 % more).
  • In durable mode a bulkWrite() or transaction() syncs 2F + 1 times for one database however many entries it has
    (in the sharded layout each insert or delete also replaces shards.json durably):
    1,200 updates in one call took 17 ms where 1,200 single updates took 271 ms (Linux, a container's virtual disk).
  • Memory to load the library. Without opcache PHP compiles the whole noneDB.php: loading peaks at 10.8 MiB over
    the start of the process (4.0.0: 8.8 MiB) and keeps 4.5 MiB of compiled code. Give the library a memory_limit
    of at least 16M
    without opcache, the small query included (it fills 12 MiB of PHP's 2 MiB chunks, and some PHP
    builds hold more at their start); with opcache, the process that compiles the file needs 22M (OPERATIONS.md §10).
    The artifact leaves out the comments of its internal classes (0.95 MB; each comment becomes its newlines, so line
    numbers stay); the public classes keep their doc comments, the test build and src/ keep every comment, and
    noneDB-migrate.php is built the same way.

Fixes

  • A dropDB() that can't remove FORMAT was reported as committed (since 4.0.0). It answers success false and
    withdraws its flag; getDurability()['lastOperation'] says rolled_back (4.0.0: committed), with the answer's
    error as the reason (DURABILITY.md §2).
  • The memo of checkpoint paths held up to 65 536 paths in 4.0.0 (18–34 MiB in a worker that goes through many
    databases); it holds 4096 (ARCHITECTURE.md "Caches").
  • Migration tool: a whole-JSON data file a crash cut was migrated as an empty database (since 4.0.0) under
    --rebuild-from-data (it was read as JSONL without an index). It stops as AMBIGUOUS_SOURCE with every option
    (MIGRATION.md §6.2).
  • Migration tool: a relative --dir failed at the verification (since 4.0.0) when the tool did not run from its
    own directory (the engine it checks with resolves a relative dbDir against the entry script's directory), and left
    the journal open: the store answered MAINTENANCE_IN_PROGRESS until --abort. The tool resolves --dir first.
  • tests/Performance/operator_benchmark.php, spatial_benchmark.php and performance_benchmark.php failed
    (since 4.0.0) at their second dataset size ("the store record is missing"): they removed the files of their
    directory and left the database directories. They empty it whole.
  • A rolled-back write could leave an index of its lines behind. A write of several steps (bulkWrite(), a
    write by filter over several shards) that built an index or wrote a checkpoint after its first append left that
    file in place when it was rolled back: a lookup through such a global field index could miss a record the
    rollback had restored (and a unique rule accept its value twice), and a field index or a checkpoint of the undone
    lines could be used again once later lines had the same length and the same end. A rollback removes what the write
    derived from its appends. A full recovery (J) removes the global indexes and every checkpoint or index that
    covers more bytes than its segment has, and fails while it can't (DURABILITY.md §4, STORAGE_FORMAT.md §7.3).
  • A spatial query could miss a record after compact() removed an emptied shard (in 4.0.0 too). The
    compaction wrote the global spatial index again without the removed shard, vouching for the entries of the shards
    it had just replaced: a record that had moved before the compaction was not found at its new place by
    withinBBox(), withinDistance() and the other spatial queries until the shard's index was built again. The
    compaction removes the global spatial index (the lookups make it again). A database that 4.0.0 compacted that way
    needs no step: a global spatial index that 4.0.0 wrote is used entry by entry, each checked against its shard, and
    written again once checked (STORAGE_FORMAT.md §6.5, header member lv).
  • A lookup could skip a shard the global field index had no room for yet (in 4.0.0 too). When a lookup made the
    field index of a shard beyond the shards and values the global field index was made for (the ninth, the
    seventeenth, … shard, or one with more values than the file has bits for), the shard was listed at once but got
    its filter only when the lock session ended. Every later lookup of that session took the shard to hold no value: a
    unique rule accepted a value the shard held (an insert() of several records, a bulkWrite()), and an update()
    or delete() by that field later in the same bulkWrite() missed the shard's records. It happened in a process's
    first operations on the index, so in any web request. A shard's entry always goes with its filter: until the file
    is made again, a lookup reads the shard, or its lines since the filter the file has for it.
  • A process went on with the epoch of a segment whose checkpoint had been made again (in 4.0.0 too). A
    checkpoint that was lost, one that did not fit its data and was rebuilt, and every checkpoint rebuildIndex() made
    got a new segment epoch that no other process was told of: a long-running one kept its key index under the epoch
    that was gone. No answer was wrong, but it read shards the global index could have ruled out, and the index files
    it wrote named an epoch no other process had, which made the other processes build the same files again. A new
    epoch of a segment that was there comes under a new lock epoch, which makes every process read the database's files
    again (STORAGE_FORMAT.md §6.4).
  • getMetrics(), explain() and backup() could write index files (in 4.0.0 too). On a checkpoint that did not
    fit its data file they rebuilt the segment's indexes as a read does: the field and spatial index files were written
    again but not the checkpoint, so those files named an epoch no checkpoint had and the next process built them once
    more. They replay the lines in memory and leave every file as it is; the next read or write that loads the segment
    rebuilds the checkpoint.
  • compact() wrote a line into a shard that had never held one (a shard an insert had begun before it was
    undone): the tombstone of the last key of the shard before it. checkIntegrity() then reported a bad line, and
    every later compact() moved it to quarantine and wrote it again. No record was affected.
  • Removing the rules, or the last index, could report success when nothing was removed. When setRules($db, [])
    could not remove the rules file, or dropping the last field or spatial index could not remove the index list, the
    call answered as if it had worked: the process went on without the rules (or the index) while the file said
    otherwise to every other process. Both throw a RuntimeException, and nothing changes.
  • A buffered insert could be lost after another process died in the middle of its own (in 4.0.0 too). A process
    that had flushed its write buffer remembered that the buffer file was gone; when another process then buffered a
    record and was killed in the middle of the line, the first process appended its next record to the torn line, and
    the flush set both aside as one damaged line. What a process remembers of the buffer's end goes stale with every
    write of another process: the torn line is set aside and cut first, and the record is kept.
  • A flush of the write buffer loaded the key index the process held (in 4.0.0 too). The flush left the key index
    out of the cache: the insert of the buffered records loaded it again, and a flush that failed because the buffer
    could not be renamed left the process without it although nothing had been written. The index stays in the cache.
    A flush that failed after its rename had moved the buffer (the rename moved it and still reported a failure, or
    its sync failed in durable mode) was taken for a write that wrote nothing, so other processes were not told to
    look again. It is a failed write: the process forgets what it holds of the database, the generation moves, the
    flush reports rolled_back, and the next session flushes the moved records with their keys.
  • A long-running process that used many databases grew without bound (in 4.0.0 too). What a process remembers
    of each database it has used (a few KiB) was not covered by cacheMemoryLimit: a worker that went through
    thousands of databases stayed over the limit, lost its cache with every operation, and ended at PHP's
    memory_limit (at 32M: after about 3500 small databases). Over the limit a process forgets the databases it holds
    no index of, except the 64 it used last, and the lines parsed after an index's checkpoint are dropped by the limit
    as the indexes are. A process keeps nothing of dropped databases and of shards a compaction removed.
  • A restore that was refused or failed left a damaged database open to the process that tried (in 4.0.0
    too). After restore() was refused, or failed, for a database that answers FORMAT_DAMAGED, the same process
    read records of an old generation of it, or nothing, and could write. The database stays damaged to that
    process as to every other.
  • getMetrics() of a sharded database whose shards.json can't be read said records 0. The number comes
    from the shards then.
  • A state record with an empty token was accepted. By STORAGE_FORMAT.md §4.2 it is damaged, and is read so.
  • -0.0 and 0.0 were two values in a process with opcache (in 4.0.0 too). 4.0.0 made them one by adding
    0.0, a sum opcache's optimizer removes. With opcache on (the usual setup of a web SAPI) distinct() and groups
    listed both zeros, and a find of 0.0 through a field index missed the record that holds -0.0 (a scan found
    it). They are one value everywhere. A field index written by a process with opcache may hold -0.0 in a bucket of
    its own: createFieldIndex() on the field builds it again.
  • The first look at a database cost more the more databases a process knew (in 4.0.0 too). A process that
    opened a database for the first time searched everything it kept, of every database, for entries of that one to
    drop (there are none). Nothing is searched at a first look: a worker that goes through 2000 small databases, a
    find by key in each, takes 0.57 s where 4.0.0 takes 1.6 s.
  • An instance with caches of its own, used inside an operation of another instance (in 4.0.0 too). After
    disableStaticCache() every instance has its own caches. One used while another instance of the process held the
    database's lock (an error handler or a callback that reads the same database) answered from what it had read
    earlier: it missed records written since, and the instance that held the lock did not see a record the other one
    wrote. Every call of an instance into an open lock session compares what it holds with the session's state and
    notes what it wrote; when it leaves, a write is told to the other instances of the process that hold the
    database, as a write of another process is. The undo of a transaction or of a bulkWrite() drops what every
    instance holds of the database (ARCHITECTURE.md "Instances with caches of their own"). With the shared caches
    (the default) nothing of this runs.
  • A lookup threw when a lost global field index could not be written again (in 4.0.0 too). In a sharded
    database whose .gfx was gone and whose directory took no new file (a full disk, a read-only directory), a
    find(), update() or delete() by the indexed field and the check of a unique rule on it threw
    RuntimeException ("failed to write index"). The lookup reads the shards and their field indexes as it does
    without the file, with the same answer and the same unique check; the next session that can write makes the file
    again (STORAGE_FORMAT.md §6.5, DURABILITY.md §3: a derived file only costs a rebuild).
  • deletedCount after a rolled-back delete. In a sharded database the counters of deleted records
    (getShardInfo()['deletedCount'], compact()['freedSlots']) stayed raised when a delete was rolled back.
    They are put back to what they were before the write.
  • Deleting many records that share one value of an indexed field was slow (in 4.0.0 too). An index that follows
    the data took each removed key out of its bucket's list by a search and a copy of the whole list, so k keys out of
    a bucket of n cost k × n: after a delete of 10 000 of 60 000 records that share one value, the next read of the
    field took 6.4 s in 4.0.0 (0.08 s when the values differ). Updates that move keys out of a bucket and a TTL purge
    of records that expire together paid the same. The replay notes the keys that leave a bucket and takes them out of
    each list once when it ends (n + k): the same read takes 0.14 s. The index files are the same (ARCHITECTURE.md
    "Tails").

Storage format and durability

  • A switch to shards writes each shard's checkpoint with the counters of the shard's own lines. A checkpoint that
    4.0.0's switch wrote, with the shard size as n whatever the lines hold, stays valid (STORAGE_FORMAT.md §6.4: a
    shard's n is at least what its lines say); keys are not affected: the highest key is kept by its tombstone.
  • A global spatial index (.grx) says with the header member lv 2 that its lock epoch vouches for its entries
    (§6.5). One without it, as 4.0.0 wrote them, is used entry by entry and written again once checked; 4.0.0 reads
    a file with lv as its own.
  • STORAGE_FORMAT.md §5.1: the optional rules file (a sealed record, replaced atomically and synced in both
    modes) and the derived ttl.next; §6.5: the v of .fx/.gfx is 1 for a field name without ., 2 with one.
    .rx/.grx stay 1. A 4.0.0 database has neither file and opens unchanged.
  • STORAGE_FORMAT.md §4.2.1, §7.4: the journal of a transaction lives in the database's LOCK file after the
    state record (a header at bytes 128–255, lines from 256), and a transaction over several databases commits by
    creating .nonedb-maintenance/txn/{id}. noneDB 4.0.0 reads the first 128 bytes of LOCK only and never
    truncates the file: what keeps it out of a pending database is the flag m, which it knows. No new file in a
    database directory, no new flag.
  • DURABILITY.md §3.1: the sync order of a transaction (2F + 1 syncs for one database, N + 2F + 2 for several);
    §2 and §6: pendingRecovery; §5: transaction() and bulkWrite() are atomic under SIGKILL. An
    update()/increment() by filter, an upsert that matched several records and purgeExpired() outside a
    transaction may be applied in part after a SIGKILL (as any write of several records); a write of one record (an
    increment() of one record, an upsert that inserts, findOneAndUpdate()) is before or after. §6: the operation
    names update, bulkWrite, findOneAndUpdate, findOneAndDelete, setRules, purgeExpired, transaction.

Known issues

  • A rollback loads some indexes again. The undo of a transaction or of a write refused after it wrote drops what
    the process holds of the segments the write appended to, with the shard list and the global indexes; the other
    segments' key and field indexes stay. The field and spatial indexes of those segments are loaded again at their
    next use. In the sharded layout the undo counts only those shards again and goes through the shard list once: an
    undo of one changed record takes 1.6 ms with 200 shards of 100 records and 4.7 ms with 800, where a commit takes
    0.2–0.35 ms. The key index of a segment the write appended to stays when the checkpoint on disk is the one it was
    made from and ends at or before the cut (80 000 records in one file: the undo of a transaction takes 0.38 ms, the
    first read after it 0.34 ms). A key index held as a body is always kept as a body (its lines are replayed); a
    decoded one is loaded again when the lines past the cuts of all the files the undo cuts are more than 64 KiB
    together, when the lines between its checkpoint and the cut are more than 1 MiB or one of them is damaged, or when
    the checkpoint has the sparse layout (most keys deleted) or a block of it doesn't check. Either is loaded again when
    the checkpoint is not there or not the index's (another process wrote one since). A failure while the undo reads
    those lines drops the indexes and never stops the undo (ARCHITECTURE.md "Memory"). A write that wrote to the
    buffer, or in which a flush, a compaction or the switch to shards ran, forgets everything when it fails; a plain
    write (not a transaction or a bulkWrite()) that fails with an I/O error leaves its shards to the next session,
    which counts every shard again.

Not in this release

  • Change streams: they need a server that keeps running.
  • The aggregation pipeline language: aggregate() covers the grouped aggregates.
  • Savepoints and nested transactions, and transactions that span more than one store.
  • Paths in spatial fields.