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

storeliveness: check clock to determine support from #131113

Merged
merged 1 commit into from
Sep 26, 2024

Commits on Sep 25, 2024

  1. storeliveness: do not return a boolean in SupportFrom

    Previously, `SupportFrom` returned a boolean indicating whether support
    is provided, in addition to an epoch and an expiration of the provided
    support. It was the caller's responsibility to not blindly trust the
    boolean but also to compare the returned timestamp to its clock
    (a timestamp in the past imples support has expired). This logic is
    error-prone because the caller may only consider the boolean and
    conclude support is provided.
    
    This commit removes the boolean return value in `SupportFrom`, and makes
    it explicit that the caller needs to compare the expiration timestamp
    to determine if support is provided.
    
    Part of: cockroachdb#125063
    
    Release note: None
    miraradeva committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    72e0001 View commit details
    Browse the repository at this point in the history