Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track value category, staleness, and sync state separately for ActorCache::Entries #1033

Merged
merged 6 commits into from
Aug 30, 2023

Commits on Aug 30, 2023

  1. Configuration menu
    Copy the full SHA
    7873c76 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    200cc93 View commit details
    Browse the repository at this point in the history
  3. Cleanup: Simplify ActorCache::Entry creation

    This also fixes an inconsequential bug wherein we set dummy values to CLEAN instead of NOT_IN_CACHE.
    bcaimano committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    29b4b84 View commit details
    Browse the repository at this point in the history
  4. Include actor cache entries for unknown values in the LRU

    Tracking these unknown values makes our logic around staleness and eviction simpler. It also prevents non-intersecting list calls (which add unknown entries for their end key) from filling up the cache with unevictable entries. Since both unknown (END_GAP) and known (CLEAN) entries can now be stale, entry staleness becomes its own boolean.
    bcaimano committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    9c5e962 View commit details
    Browse the repository at this point in the history
  5. Make ActorCache::Entry value categories constant

    This commit introduces separate enum for if a value is present, absent, or unknown that is constant for the lifetime of an `Entry`. This makes our logic in several places clearer and provides the ground work for coalescing reads (since we'll need an entry in cache for them).
    bcaimano committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    3469a23 View commit details
    Browse the repository at this point in the history
  6. Cleanup: Rename EntryState to EntrySyncStatus

    Since we have now moved staleness and value category to their own bytes, we can shrink down our sync status to its own byte and make it clearer that it indicates membership in various maps and lists.
    bcaimano committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    18d864c View commit details
    Browse the repository at this point in the history