gargvishesh commented on code in PR #16563:
URL: https://github.com/apache/druid/pull/16563#discussion_r1632609612


##########
server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:
##########
@@ -2449,21 +2445,24 @@ private Map<String, String> 
getAppendSegmentsCommittedDuringTask(
     return segmentIdToLockVersion;
   }
 
-  private Set<String> segmentExistsBatch(final Handle handle, final 
Set<DataSegment> segments)
+  private Set<String> findExistingSegmentIds(final Handle handle, final 
Set<DataSegment> segments)
   {
-    Set<String> existedSegments = new HashSet<>();
+    final Set<String> existingSegmentIds = new HashSet<>();
 
-    List<List<DataSegment>> segmentsLists = Lists.partition(new 
ArrayList<>(segments), MAX_NUM_SEGMENTS_TO_ANNOUNCE_AT_ONCE);
+    final List<List<DataSegment>> segmentsLists = Lists.partition(
+        new ArrayList<>(segments),
+        SEGMENT_INSERT_BATCH_SIZE
+    );

Review Comment:
   Think it is within the line limit.
   ```suggestion
       final List<List<DataSegment>> segmentsLists = Lists.partition(new 
ArrayList<>(segments), SEGMENT_INSERT_BATCH_SIZE);
   ```



##########
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalAppendAction.java:
##########
@@ -44,20 +44,18 @@
 import java.util.stream.Collectors;
 
 /**
- *
- * Append segments to metadata storage. The segment versions must all be less 
than or equal to a lock held by
- * your task for the segment intervals.
- *
- * <pre>
- * Pseudo code (for a single interval):
- * For an append lock held over an interval:
- *     transaction {
- *       commit input segments contained within interval
- *       if there is an active replace lock over the interval:
- *         add an entry for the inputSegment corresponding to the replace 
lock's task in the upgradeSegments table
- *       fetch pending segments with parent contained within the input 
segments, and commit them
- *     }
- * </pre>
+ * Action used by an APPEND task to transactionally commit segments to the
+ * metadata store for one or more intervals of a datasource. These segments are

Review Comment:
   ```suggestion
    * metadata store for one or more intervals of a datasource. These segments
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to