ankitsultana commented on code in PR #10815:
URL: https://github.com/apache/pinot/pull/10815#discussion_r1318160656


##########
pinot-controller/src/main/java/org/apache/pinot/controller/validation/RealtimeSegmentValidationManager.java:
##########
@@ -117,8 +117,18 @@ protected void processTable(String tableNameWithType, 
Context context) {
 
   private void runSegmentLevelValidation(TableConfig tableConfig, 
PartitionLevelStreamConfig streamConfig) {
     String realtimeTableName = tableConfig.getTableName();
+
     List<SegmentZKMetadata> segmentsZKMetadata = 
_pinotHelixResourceManager.getSegmentsZKMetadata(realtimeTableName);
 
+    // Delete tmp segments
+    try {
+      long numDeleteTmpSegments = 
_llcRealtimeSegmentManager.deleteTmpSegments(realtimeTableName, 
segmentsZKMetadata);

Review Comment:
   nit: one alternative for this may be to check 
`isTmpSegmentAsyncDeletionEnabled` outside `deleteTmpSegments` and avoid 
calling `deleteTmpSegments` altogether if the feature is not enabled. Also 
`deleteTmpSegments` could add a 
`Precondition(isTmpSegmentAsyncDeletionEnabled(), "called even though not 
enabled")`. Though this also works so feel free to ignore.



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