jackjlli commented on a change in pull request #8069:
URL: https://github.com/apache/pinot/pull/8069#discussion_r793108733
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -686,20 +686,26 @@ public SegmentZKMetadata getSegmentZKMetadata(String
tableNameWithType, String s
return ZKMetadataProvider.getSegmentsZKMetadata(_propertyStore,
tableNameWithType);
}
+ public synchronized PinotResourceManagerResponse deleteSegments(String
tableNameWithType, List<String> segmentNames) {
+ return deleteSegments(tableNameWithType, segmentNames, false);
+ }
+
/**
* Delete a list of segments from ideal state and remove them from the local
storage.
*
* @param tableNameWithType Table name with type suffix
* @param segmentNames List of names of segment to be deleted
+ * @param isInstanceDelete Indicate if the deleted segments will be put in
retention before deletion.
* @return Request response
*/
- public synchronized PinotResourceManagerResponse deleteSegments(String
tableNameWithType, List<String> segmentNames) {
+ public synchronized PinotResourceManagerResponse deleteSegments(String
tableNameWithType, List<String> segmentNames,
+ boolean isInstanceDelete) {
Review comment:
The parameter name seems inconsistent across the PR. It'd be good to
unify it.
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -686,20 +686,26 @@ public SegmentZKMetadata getSegmentZKMetadata(String
tableNameWithType, String s
return ZKMetadataProvider.getSegmentsZKMetadata(_propertyStore,
tableNameWithType);
}
+ public synchronized PinotResourceManagerResponse deleteSegments(String
tableNameWithType, List<String> segmentNames) {
+ return deleteSegments(tableNameWithType, segmentNames, false);
+ }
+
/**
* Delete a list of segments from ideal state and remove them from the local
storage.
*
* @param tableNameWithType Table name with type suffix
* @param segmentNames List of names of segment to be deleted
+ * @param isInstanceDelete Indicate if the deleted segments will be put in
retention before deletion.
Review comment:
Could you update this description a bit? What happens if it's true and
what happens if it's false.
--
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]