Jackie-Jiang commented on code in PR #10406:
URL: https://github.com/apache/pinot/pull/10406#discussion_r1132717436


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java:
##########
@@ -124,6 +124,7 @@ protected void doAddSegment(ImmutableSegment segment) {
       if (validDocIds != null && validDocIds.isEmpty()) {
         _logger.info("Skip adding segment: {} without valid doc, current 
primary key count: {}",
             segment.getSegmentName(), getNumPrimaryKeys());
+       immutableSegmentImpl.setValidDocIds(new 
ThreadSafeMutableRoaringBitmap());

Review Comment:
   ```suggestion
          immutableSegmentImpl.enableUpsert(this, new 
ThreadSafeMutableRoaringBitmap());
   ```
   



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java:
##########
@@ -102,6 +102,10 @@ public void enableUpsert(PartitionUpsertMetadataManager 
partitionUpsertMetadataM
     _validDocIds = validDocIds;
   }
 
+  public void setValidDocIds(ThreadSafeMutableRoaringBitmap validDocIds) {

Review Comment:
   Suggest not adding this method since we want to keep a reference to the 
upsert metadata manager



-- 
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: commits-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to