Skip to content

Track translog bytes across commits - #1

Closed
shourya035 wants to merge 1 commit into
mainfrom
remote-translog-byte-tracker
Closed

Track translog bytes across commits#1
shourya035 wants to merge 1 commit into
mainfrom
remote-translog-byte-tracker

Conversation

@shourya035

@shourya035 shourya035 commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Description

Introduces a concurrency-safe TranslogBytesTracker abstraction for bytes written since the last successful index commit.

  • Captures the tracked byte count at commit start.
  • Removes only the captured bytes after a successful commit.
  • Preserves writes that race with an in-progress commit.
  • Leaves accounting unchanged when a commit fails.
  • Rejects negative byte increments.

This layer contains no production-flow wiring.

Related issue

Tracks opensearch-project#22802.

Stack

  1. Track translog bytes across commits聽#1 Byte tracking abstraction (this PR)
  2. Restore size-based remote translog flushes聽#2 Remote translog flow and opt-in setting
  3. Verify remote translog size-based flushing聽#3 Remote-store integration coverage

Testing

  • ./gradlew :server:test --tests "org.opensearch.index.translog.TranslogBytesTrackerTests"
  • ./gradlew :server:precommit

Checklist

  • Functionality includes unit tests.
  • Commits are signed off.

Add an atomic tracker that snapshots bytes at commit start and
removes only the captured bytes after a successful commit. This
preserves writes that race with the commit and leaves accounting
unchanged when a commit fails.

Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
@shourya035 shourya035 closed this Aug 21, 2026
@shourya035
shourya035 deleted the remote-translog-byte-tracker branch August 21, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant