Open Habbie opened 1 year ago
For bonus points, update our cache of the txnid when -we- do a write, (and the txnid we opened is the one currently cached), so we don't flush when we know exactly what we did.
Is the "flush" global or per zone? Is this about packet-cache, query-cache or both?
This would be about a global flush for all caches (packet, query, negquery, zone metadata perhaps).
So what if lmdb-lightningstream updates come every second? Flushing cache every second can have negative impact. There should be some "flush-only-after-seconds: X" config
Short description
When users change things via the API, the auth knows this, and can flush caches. When changes come in via some other path, such as Lightning Stream, the auth does not know. However, every update to an LMDB updates the txnid, which is cheap to read.
Usecase
Reducing the appearance of replication lag (which can, with default cache settings, look like a full minute).
Description
When
lmdb-lightningstream
is set, auth should periodically (say, every second) check txnid on all open databases, and if it changes, flush the caches.