Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ste/sender-blockBlob.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ func (s *blockBlobSenderBase) Epilogue() {
CPKScopeInfo: s.jptm.CpkScopeInfo(),
})
if err != nil {
jptm.FailActiveSend(common.Iff(blobTags != nil, "Committing block list (with tags)", "Committing block list"), err)

/*
If we get an invalid block list, it's likely one of our blocks was deleted, or GC'd mid-job or something.
Knowing which blocks are missing is useful, as up to 50k blocks can exist in a single object.
Expand Down Expand Up @@ -331,6 +329,9 @@ func (s *blockBlobSenderBase) Epilogue() {
}
}

// Fail _afterwards_, since this is the action that cancels our context. Unfortunately, doing this would cause us to fail to send the request that'd get us details on the block list.
jptm.FailActiveSend(common.Iff(blobTags != nil, "Committing block list (with tags)", "Committing block list"), err)

Comment on lines +332 to +334
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that FailActiveSend is delayed until after the InvalidBlockList diagnostics, any latency/hang in the GetBlockList call (or subsequent formatting) will delay marking the transfer failed/canceling the context. Consider running the diagnostic GetBlockList under a short, bounded timeout context (best-effort) so this debug path can’t stall epilogue/failure propagation.

Copilot uses AI. Check for mistakes.
Comment on lines +332 to +334
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, the InvalidBlockList diagnostic logging will actually execute before failing. That path currently logs the full blockIDs slice and builds block ID lists via repeated string concatenation, which can become extremely large/slow (comment notes up to 50k blocks) and can bloat log files. Consider limiting/summarizing at error level (counts + a small sample) and only emitting full lists when debug logging is enabled, and use a builder-based formatter to avoid O(n^2) concatenation costs.

Copilot uses AI. Check for mistakes.
return
}

Expand Down
Loading