Skip to content

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

Closed
@sachinpkale

Description

@sachinpkale

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

Metadata

Metadata

Assignees

Labels

Storage:RemoteenhancementEnhancement or improvement to existing feature or request

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions