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

cnidarium: prefix queries over substores are hazardous #4653

Merged
merged 7 commits into from
Jun 24, 2024

Commits on Jun 24, 2024

  1. cnidarium(tests): reproduce dirty prefix bug

    The bug is caused by a layering violation: keys returned by prefix queries have their *substore prefix* truncated. However, `StateDelta` are unaware of this implementation detail and maintain a global namespace for all changes.
    
    This create an issue in the cache interleaving logic, where the search range that we construct to look for new writes/covering deletions between keys will build a nonsensical range, for example using the full key (incl. substore prefix) as a lower bound and a susbtore key (with a truncated prefix).
    
    The effect of this bug can vary from a panic, to skipping valid entries that should be returned by the prefix query.
    erwanor committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    8998983 View commit details
    Browse the repository at this point in the history
  2. cnidarium: add sketch for fix

    erwanor committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    ff7c824 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb0959c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3c6b83f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    de46139 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    683db9c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6d82473 View commit details
    Browse the repository at this point in the history