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

[Timestamp Pinning in Remote Store] Remote translog garbage collection changes #15064

Closed
sachinpkale opened this issue Aug 1, 2024 · 1 comment
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Remote

Comments

@sachinpkale
Copy link
Member

sachinpkale commented Aug 1, 2024

Is your feature request related to a problem? Please describe

As part of shallow snapshot optimisations, we are introducing timestamp based implicit locking support. This feature will be called Timestamp Pinning in remote backed storage. When a timestamp is pinned, remote store garbage collectors will skip deleting data corresponding to the timestamp.

Describe the solution you'd like

As part of this solution, we need following changes to segment store garbage collection

  • Each data node keeps an in-memory data structure remote_store_pinned_timestamps (this is updated regularly as part of [Timestamp Pinning in Remote Store] Scheduler to fetch pinned timestamp list from remote store #15062)
  • If the last update time of remote_store_pinned_timestamps is > X mins, skip garbage collection.
  • Fetch metadata files in sorted order (which generally is reverse-chronological order but not always)
  • If timestamp of a metadata file md1 is > pinned_timestamp_a and the timestamp of next metadata file md2 <= pinned_timestamp_a add md2 to pinned_metadata_files
  • Skip deletion of metadata files in pinned_metadata_files and corresponding data files

Related component

Storage:Remote

@sachinpkale
Copy link
Member Author

We also need to handle garbage collection on index delete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Remote
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant