rpuch commented on code in PR #7313:
URL: https://github.com/apache/ignite-3/pull/7313#discussion_r2647156446


##########
modules/table/src/test/java/org/apache/ignite/internal/table/distributed/replication/PartitionReplicaListenerIndexLockingTest.java:
##########
@@ -422,6 +419,10 @@ void testReadWriteSingle(ReadWriteTestArg arg) {
         );
     }
 
+    private static @NotNull ReplicaPrimacy replicaPrimacy() {
+        return 
ReplicaPrimacy.forPrimaryReplicaRequest(HybridTimestamp.MIN_VALUE.longValue());

Review Comment:
   Specifically in this class, there is no placement driver used.
   
   In other classes, it is there, but I would have to deal with the 
future-based API to get meta and then get the timestamp from it. It looks 
fragile as at some point we could change the test placement driver 
implementation to sometimes return null.
   
   Also, I don't see where that HybridTimestamp(0, 1) is used in the test 
implementation.
   
   All in all, using just constant 1 seems to be an easier and, probably, not 
more fragile way to get a 'primacy' instance.
   
   Another way would be to just use the primacy engine, but that would also be 
a bit clumsy (and in at least one class there is no placement driver needed for 
it)



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