You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a distributed deployment, the cache may contain stale records. We want the cache to be invalidated when a new Azks record with a higher epoch number is detected, so that stale HistoryTreeNodes are not used to generate proofs. This involves remembering the epoch of the Azks record in the cache, and at TTL expiration checking it against the newly fetched Azks record to see if the epoch number changed. If it has, the entire cache should be dumped.
The text was updated successfully, but these errors were encountered:
…and when a change in epoch is detected, flush the cache
Additionally add support for a read-only directory which cannot perform "write" operations to the directory
Resolves: #149, #148
…nd invalidate cache (#150)
* Add the ability to periodically poll for changes to the AZKS record, and when a change in epoch is detected, flush the cache
Additionally add support for a read-only directory which cannot perform "write" operations to the directory
Resolves: #149, #148
* Apply clippy lints and fix test infra (mysql_async version bump)
* rustfmt
* Addressing @afterdark 's comments around cache access and flushing potential races.
Adds a multi-reader, single-flusher protection around cache operations. Additionally, readers need to poll for AZKS changes or the cache will never update the AZKS object as it's now cached forever until a manual flush operation is done.
* Missed clippy's
Co-authored-by: Sean Lawlor <seanlawlor@fb.com>
In a distributed deployment, the cache may contain stale records. We want the cache to be invalidated when a new
Azks
record with a higher epoch number is detected, so that staleHistoryTreeNodes
are not used to generate proofs. This involves remembering the epoch of theAzks
record in the cache, and at TTL expiration checking it against the newly fetchedAzks
record to see if the epoch number changed. If it has, the entire cache should be dumped.The text was updated successfully, but these errors were encountered: