yschengzi commented on code in PR #11478:
URL: https://github.com/apache/iotdb/pull/11478#discussion_r1383339510
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/MinimumProgressIndex.java:
##########
@@ -79,6 +81,11 @@ public ProgressIndexType getType() {
return ProgressIndexType.MINIMUM_PROGRESS_INDEX;
}
+ @Override
+ public TotalOrderSumTuple getTotalOrderSumTuple() {
+ return new TotalOrderSumTuple(0L);
Review Comment:
negative value of MinimumProgressIndex is forbidden for the correctness of
algorithm.
##########
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/TsFileResourceProgressIndexTest.java:
##########
@@ -218,4 +229,100 @@ public void testHybridProgressIndex() {
Assert.assertFalse(
hybridProgressIndex.isAfter(new RecoverProgressIndex(1, new
SimpleProgressIndex(2, 21))));
}
+
+ @Test
+ public void testProgressIndexTopologicalSort() {
+ Random random = new Random();
+ List<ProgressIndex> progressIndexList = new ArrayList<>();
+
+ int ioTProgressIndexNum = 10, peerIdRange = 3, searchIndexRange = 1000;
Review Comment:
done.
--
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]