The Python servers trim their log, and a partial TTL index keeps what it does not hold
Summary: The Python servers checkpoint while they run, so their log is trimmed, and a partial TTL index no longer deletes documents outside its filter (v0.7.0b3).
This release changes two things in the Python servers, and one of them was deleting data.
A partial TTL index deleted documents it does not hold. When the Python
MongoDB server expired documents, it ignored a partial TTL index's filter.
Given three expired documents, one of them matching the filter, it deleted all
three. It now deletes the one, as mongod 8.2.11 does. Two related gaps closed
with it: a compound index that collMod had given an expireAfterSeconds
expired documents (mongod refuses that collMod, and so does this server
now, with code 72), and a date held in an array was never expired.
The log is trimmed while the server runs. The Python store used to
checkpoint only when it closed, in a backup and in fsync. WiredTiger removes
a log file only after a checkpoint, so a long-running secantusd-py or
secantusd-py-pg kept every log file it had written, and replayed all of them
after a crash. A durable store now checkpoints every 60 seconds.
SECANTUS_CHECKPOINT_SECONDS sets the interval, as it does for the Rust
servers, and 0 turns it off. A store opened for tests (durable=False, or
SECANTUS_TEST_FAST_STORAGE=1) still does not checkpoint while open.
The Rust servers had the same log gap and were fixed first: on secantusd-rs,
a restart after a kill went from 81 seconds to 4. They ship as crates and
binaries rather than in this package; secantus-mdb 0.5.3-beta.193 and
secantus-pg 0.1.0-beta.15 carry the fix.
The rest of this release's changelog is Rust server and tooling work that
reached main since 0.7.0b2.