Skip to content

Metrics: Fix objstore_bucket_operation_transferred_bytes never reco… - #283

Open
leizor wants to merge 1 commit into
thanos-io:mainfrom
leizor:leizor/missing-xfered-bytes-readat
Open

leizor wants to merge 1 commit into
thanos-io:mainfrom
leizor:leizor/missing-xfered-bytes-readat

Conversation

@leizor

@leizor leizor commented Sep 16, 2026

Copy link
Copy Markdown

…rded when the underlying reader is read via io.ReaderAt

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

timingReaderSeekerReaderAt.ReadAt now updates metrics so the objstore_bucket_operation_transferred_bytes records correctly. This fixes the metric for multipart uploads, which currently always only records 0.

Verification

Added two tests:

  • TestMetricBucket_Upload_ReadAt
  • TestTimingReader_ConcurrentReadAt

I've also run this code in a dev environment I have.

@leizor
leizor force-pushed the leizor/missing-xfered-bytes-readat branch from a62b02a to 526ce87 Compare September 16, 2026 20:40
@leizor

leizor commented Sep 16, 2026

Copy link
Copy Markdown
Author

That failing test should be fixed by #284.

@leizor
leizor marked this pull request as ready for review September 16, 2026 21:19
@leizor
leizor force-pushed the leizor/missing-xfered-bytes-readat branch from 526ce87 to ca4f1ec Compare September 17, 2026 23:02
@leizor
leizor marked this pull request as draft September 17, 2026 23:46
@leizor
leizor force-pushed the leizor/missing-xfered-bytes-readat branch 5 times, most recently from 3054a06 to 61b6399 Compare September 21, 2026 19:41
when the underlying reader is read via io.ReaderAt

Signed-off-by: Justin Lei <lei.justin@gmail.com>
@leizor
leizor force-pushed the leizor/missing-xfered-bytes-readat branch from 61b6399 to 431a41f Compare September 21, 2026 19:58
@leizor
leizor marked this pull request as ready for review September 21, 2026 21:01
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