Welcome to the platform team. The in-memory database in database/ implements all four levels described in README.md: records, scans, values that expire, and point-in-time reads. Since the last release, four reports have…
Welcome to the platform team. The in-memory database in database/ implements all four levels described in README.md: records, scans, values that expire, and point-in-time reads. Since the last release, four reports have come in. Two of them already have failing tests in tests/visible/.
Fix as much as you can in 40 minutes. The checks are graded one by one, so each report you fix counts even if the rest is not done.
A session token written with set_with_ttl(100, "session:42", "token", 7, 30) is still returned by get at timestamp 130. By the rules it is gone at 130. Scans and get_when show it at its expiry time too.
timestamp + ttl for get, scan, scan_by_prefix and get_when.For a key with the fields age, agent and page, scan_by_prefix(..., "ag") also returns page(3).
scan_by_prefix keeps only the fields whose name starts with the prefix.A lock written with a TTL had long expired, yet compare_and_set with its old value returned True and wrote a new value. compare_and_delete deletes expired values the same way.
compare_and_set, compare_and_set_with_ttl and compare_and_delete return False and change nothing when the value has expired.After compare_and_delete removes a field at timestamp 50, get_when(..., at_timestamp=60) still returns the old value.
get_when reads it as None until it is set again.pytest tests/visible. Four tests fail until MDB-11 and MDB-14 are fixed.Visible test command
pytest tests/visibleThe repository’s own tests. Run all tests includes them, and so does every submission.
Repository
in-memory-database-expiry-prefix-and-history-bugs
Changes under src/ are evaluated.