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

[BUG] listener.onFailure is not called on failure to pin the older timestamp #16247

Open
sachinpkale opened this issue Oct 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working Storage:Remote

Comments

@sachinpkale
Copy link
Member

sachinpkale commented Oct 9, 2024

Describe the bug

  • Today, if we try to pin the timestamp that is older than now() - Lookbak Interval, we throw IllegalArgumentException
  • But as RemoteStorePinnedTimestampService.pinTimestamp is async, on any failure, listener.onFailure() should be called.
    public void pinTimestamp(long timestamp, String pinningEntity, ActionListener<Void> listener) {
    // If a caller uses current system time to pin the timestamp, following check will almost always fail.
    // So, we allow pinning timestamp in the past upto some buffer
    long lookbackIntervalInMills = RemoteStoreSettings.getPinnedTimestampsLookbackInterval().millis();
    if (timestamp < (System.currentTimeMillis() - lookbackIntervalInMills)) {
    throw new IllegalArgumentException(
    "Timestamp to be pinned is less than current timestamp - value of cluster.remote_store.pinned_timestamps.lookback_interval"
    );
    }
  • Due to this, caller will keep waiting on listener.

Related component

Storage:Remote

To Reproduce

  • Create snapshot V2 repo.
  • While creating V2 snapshot, add a sleep of 61 secs between fetching of timestamp to be pinned and actual pinTimestamp call.

Expected behavior

  • On failure, listener.onFailure should be called.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Storage:Remote
Projects
Status: 🏗 In progress
Development

No branches or pull requests

1 participant