sanpwc commented on code in PR #4477:
URL: https://github.com/apache/ignite-3/pull/4477#discussion_r1796658133


##########
modules/replicator/src/integrationTest/java/org/apache/ignite/internal/replicator/ItPlacementDriverReplicaSideTest.java:
##########
@@ -257,13 +259,19 @@ public void beforeTest(TestInfo testInfo) {
                     () -> 
IgniteUtils.shutdownAndAwaitTermination(partitionOperationsExecutor, 10, 
TimeUnit.SECONDS)
             ));
         }
+
+        grpNodes = chooseRandomNodes(3);

Review Comment:
   Why do we need to move chooseRandomNodes(3); from tests itself to beforeTest?



##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/impl/RocksDbSharedLogStorage.java:
##########
@@ -380,6 +380,8 @@ public LogEntry getEntry(long index) {
     }
 
     protected byte[] getValueFromRocksDb(byte[] keyBytes) throws 
RocksDBException {
+        assert !db.isClosed();

Review Comment:
   Please also add assertion message.



##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/RaftGroupServiceImpl.java:
##########
@@ -207,6 +207,8 @@ public <R> CompletableFuture<R> run(Command cmd) {
             );
         }
 
+        getLeader = false;

Review Comment:
   That will be removed in 23010, right?



##########
modules/replicator/src/testFixtures/java/org/apache/ignite/internal/raft/client/AbstractTopologyAwareGroupServiceTest.java:
##########
@@ -215,7 +215,7 @@ private IgniteBiTuple<TopologyAwareRaftGroupService, 
TopologyAwareRaftGroupServi
 
         assertNotNull(raftClient);
 
-        raftClient.refreshLeader().get();
+        raftClient.refreshLeader().get(WAIT_TIMEOUT_MILLIS, 
TimeUnit.MILLISECONDS);

Review Comment:
   Why do we need external timeout here? I mean that refreshLeader internally 
has time bounded limitations:
   ```
               if (currentTimeMillis() >= stopTime) {
                   fut.completeExceptionally(
                           new TimeoutException(format("Send with retry timed 
out [retryCount = {}, groupId = {}].", retryCount, groupId)));
   
                   return;
               }
   ```
   ?



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

Reply via email to