You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "hanahmily (via GitHub)" <gi...@apache.org> on 2025/09/26 02:54:12 UTC

[PR] Refactor mergeBlocks function to simplify block handling [skywalking-banyandb]

hanahmily opened a new pull request, #792:
URL: https://github.com/apache/skywalking-banyandb/pull/792

   - Removed an unused temporary block variable in the mergeBlocks function.
   - Updated the block writing logic to use the correct temporary block reference, ensuring proper block management during the merge process.
   
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor mergeBlocks function to simplify block handling [skywalking-banyandb]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor mergeBlocks function to simplify block handling [skywalking-banyandb]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #792:
URL: https://github.com/apache/skywalking-banyandb/pull/792


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org