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

fs,engineccl: allow reads to continue when writes are stalled #123057

Merged
merged 1 commit into from
Apr 25, 2024

Commits on Apr 25, 2024

  1. fs,engineccl: allow reads to continue when writes are stalled

    Both fs.FileRegistry and engineccl.DataKeyManager held an internal mutex
    when updating their state, that included write IO to to update persistent
    state. This would block readers of the state, specifically file reads
    that need a file registry entry and data key for the file to successfully
    open and read a file.
    
    Blocking these reads due to slow or stalled write IO is not desirable,
    since the read could succeed if the relevant data is in the page cache.
    Specifically, with the new WAL failover feature, we expect the store
    to keep functioning when disk writes are temporarily stalled, since the
    WAL can failover. This expectation is not met if essential reads block on
    non-essential writes that are stalled.
    
    This PR changes the locking in the FileRegistry and DataKeyManager to
    prevent writes from interfering with concurrent reads.
    
    Epic: none
    
    Fixes: cockroachdb#98051
    Fixes: cockroachdb#122364
    
    Release note: None
    sumeerbhola committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    6518185 View commit details
    Browse the repository at this point in the history