snleee commented on a change in pull request #8071:
URL: https://github.com/apache/pinot/pull/8071#discussion_r792323921
##########
File path:
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManagerTest.java
##########
@@ -816,6 +819,48 @@ public void testSegmentReplacementForRefresh()
Assert.assertEquals(new
HashSet<>(ControllerTestUtils.getHelixResourceManager()
.getSegmentsFor(OFFLINE_SEGMENTS_REPLACE_TEST_REFRESH_TABLE_NAME,
true)),
new HashSet<>(Arrays.asList("s9", "s10", "s11")));
+
+ // Call revert segment replacements
+ ControllerTestUtils.getHelixResourceManager()
+
.revertReplaceSegments(OFFLINE_SEGMENTS_REPLACE_TEST_REFRESH_TABLE_NAME,
lineageEntryId3, false);
+ waitForSegmentsToDelete(OFFLINE_SEGMENTS_REPLACE_TEST_REFRESH_TABLE_NAME,
3, MAX_TIMEOUT_IN_MILLISECOND);
+ Assert.assertEquals(new
HashSet<>(ControllerTestUtils.getHelixResourceManager()
+ .getSegmentsFor(OFFLINE_SEGMENTS_REPLACE_TEST_REFRESH_TABLE_NAME,
true)),
+ new HashSet<>(Arrays.asList("s3", "s4", "s5")));
+
+ // Re-upload (s9, s10, s11) to test the segment clean up from
startReplaceSegments
Review comment:
After the code change, we delete `segmentsTo` in 2 different path.
1. `revertReplaceSegments` API will delete `segmentsTo`
2. `startReplaceSegments` API will also try to clean up `segmentsTo` for
`REVERTED` lineage.
I tested the scenario 1. Now, I need to test the scenario 2. So, I am just
trying to set up the testing condition because revert call in the previous line
deleted `s9, s10, s11`.
--
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]