Copilot commented on code in PR #792:
URL:
https://github.com/apache/skywalking-banyandb/pull/792#discussion_r2380729133
##########
banyand/internal/sidx/merge.go:
##########
@@ -172,7 +172,7 @@ func mergeBlocks(closeCh <-chan struct{}, bw *blockWriter,
br *blockReader) (*pa
pendingBlock, tmpBlock = tmpBlock, pendingBlock
continue
}
- bw.mustWriteBlock(tmpBlock.bm.seriesID, &tmpBlock2.block)
+ bw.mustWriteBlock(tmpBlock.bm.seriesID, &tmpBlock.block)
Review Comment:
This change fixes a critical bug where `tmpBlock2` (which was never
initialized) was being dereferenced, which would cause a nil pointer
dereference. The fix correctly uses `tmpBlock` which is properly initialized
and managed in the function.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]