This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new 3ca7408c Refactor mergeBlocks function to simplify block handling
(#792)
3ca7408c is described below
commit 3ca7408cebfd30a64e1145e847203692bad9824c
Author: Gao Hongtao <[email protected]>
AuthorDate: Fri Sep 26 11:22:24 2025 +0800
Refactor mergeBlocks function to simplify block handling (#792)
---
banyand/internal/sidx/merge.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/banyand/internal/sidx/merge.go b/banyand/internal/sidx/merge.go
index a8d2733a..4f348ae5 100644
--- a/banyand/internal/sidx/merge.go
+++ b/banyand/internal/sidx/merge.go
@@ -119,7 +119,7 @@ func mergeBlocks(closeCh <-chan struct{}, bw *blockWriter,
br *blockReader) (*pa
pendingBlockIsEmpty := true
pendingBlock := generateBlockPointer()
defer releaseBlockPointer(pendingBlock)
- var tmpBlock, tmpBlock2 *blockPointer
+ var tmpBlock *blockPointer
var decoder *encoding.BytesBlockDecoder
getDecoder := func() *encoding.BytesBlockDecoder {
if decoder == nil {
@@ -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)
releaseDecoder()
pendingBlock.reset()
tmpBlock.reset()