You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "sanpwc (via GitHub)" <gi...@apache.org> on 2024/10/11 09:50:11 UTC

Re: [PR] IGNITE-23019 Research before IGNITE-23010 [ignite-3]

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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org