zhtaoxiang commented on code in PR #8959:
URL: https://github.com/apache/pinot/pull/8959#discussion_r905600039


##########
pinot-common/src/main/java/org/apache/pinot/common/minion/MinionTaskMetadataUtils.java:
##########
@@ -51,27 +64,46 @@ public static ZNRecord 
fetchTaskMetadata(HelixPropertyStore<ZNRecord> propertySt
   }
 
   /**
-   * Deletes the ZNRecord for the given minion task and tableName, from 
MINION_TASK_METADATA/taskName/tableNameWthType
+   * Deletes the ZNRecord for the given minion task and tableName, from both 
the new path
+   * MINION_TASK_METADATA/${tableNameWthType}/${taskType} and the old path
+   * MINION_TASK_METADATA/${taskType}/${tableNameWthType}.
    */
   public static void deleteTaskMetadata(HelixPropertyStore<ZNRecord> 
propertyStore, String taskType,
       String tableNameWithType) {
-    String path = 
ZKMetadataProvider.constructPropertyStorePathForMinionTaskMetadata(taskType, 
tableNameWithType);
-    if (!propertyStore.remove(path, AccessOption.PERSISTENT)) {
+    String newPath = 
ZKMetadataProvider.constructPropertyStorePathForMinionTaskMetadataNewFormat(
+        taskType, tableNameWithType);
+    String oldPath = 
ZKMetadataProvider.constructPropertyStorePathForMinionTaskMetadata(
+        taskType, tableNameWithType);
+    if (!propertyStore.remove(newPath, AccessOption.PERSISTENT)

Review Comment:
   good catch! 



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