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

[PR] IGNITE-21511 Use read only transaction id in ReadOnlyScanRetrieveBatchReplicaRequest [ignite-3]

Cyrill opened a new pull request, #3200:
URL: https://github.com/apache/ignite-3/pull/3200

   https://issues.apache.org/jira/browse/IGNITE-21511
   


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


Re: [PR] IGNITE-21511 Use read only transaction id in ReadOnlyScanRetrieveBatchReplicaRequest [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #3200:
URL: https://github.com/apache/ignite-3/pull/3200#discussion_r1489284542


##########
modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItInternalTableReadOnlyScanTest.java:
##########
@@ -33,15 +36,30 @@
  */
 @ExtendWith(MockitoExtension.class)
 public class ItInternalTableReadOnlyScanTest extends ItAbstractInternalTableScanTest {
+    private static final HybridTimestampTracker HYBRID_TIMESTAMP_TRACKER = new HybridTimestampTracker();
+
     @Override
     protected Publisher<BinaryRow> scan(int part, InternalTransaction tx) {
-        return internalTbl.scan(part, internalTbl.CLOCK.now(), mock(ClusterNode.class));
+        requireNonNull(tx);
+
+        return internalTbl.scan(part, tx.id(), internalTbl.CLOCK.now(), mock(ClusterNode.class));
     }
 
     // TODO: IGNITE-17666 Use super test as is.
     @Disabled("https://issues.apache.org/jira/browse/IGNITE-17666")
     @Override
+    @Test
     public void testExceptionRowScanCursorHasNext() throws Exception {
         super.testExceptionRowScanCursorHasNext();
     }
+
+    @Override
+    protected InternalTransaction startTx() {
+        return internalTbl.txManager().begin(HYBRID_TIMESTAMP_TRACKER, true);

Review Comment:
   Does it mean that we won't test implicit RO? Why?



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


Re: [PR] IGNITE-21511 Use read only transaction id in ReadOnlyScanRetrieveBatchReplicaRequest [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #3200:
URL: https://github.com/apache/ignite-3/pull/3200#discussion_r1489284542


##########
modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItInternalTableReadOnlyScanTest.java:
##########
@@ -33,15 +36,30 @@
  */
 @ExtendWith(MockitoExtension.class)
 public class ItInternalTableReadOnlyScanTest extends ItAbstractInternalTableScanTest {
+    private static final HybridTimestampTracker HYBRID_TIMESTAMP_TRACKER = new HybridTimestampTracker();
+
     @Override
     protected Publisher<BinaryRow> scan(int part, InternalTransaction tx) {
-        return internalTbl.scan(part, internalTbl.CLOCK.now(), mock(ClusterNode.class));
+        requireNonNull(tx);
+
+        return internalTbl.scan(part, tx.id(), internalTbl.CLOCK.now(), mock(ClusterNode.class));
     }
 
     // TODO: IGNITE-17666 Use super test as is.
     @Disabled("https://issues.apache.org/jira/browse/IGNITE-17666")
     @Override
+    @Test
     public void testExceptionRowScanCursorHasNext() throws Exception {
         super.testExceptionRowScanCursorHasNext();
     }
+
+    @Override
+    protected InternalTransaction startTx() {
+        return internalTbl.txManager().begin(HYBRID_TIMESTAMP_TRACKER, true);

Review Comment:
   Does it mean that we won't test implicit RO? Why?



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


Re: [PR] IGNITE-21511 Use read only transaction id in ReadOnlyScanRetrieveBatchReplicaRequest [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc merged PR #3200:
URL: https://github.com/apache/ignite-3/pull/3200


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


Re: [PR] IGNITE-21511 Use read only transaction id in ReadOnlyScanRetrieveBatchReplicaRequest [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #3200:
URL: https://github.com/apache/ignite-3/pull/3200#discussion_r1489297466


##########
modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItAbstractInternalTableScanTest.java:
##########
@@ -287,16 +289,16 @@ public void onComplete() {
     /**
      * Checks that {@link IllegalArgumentException} is thrown in case of invalid partition.
      */
-    @Test()
+    @Test
     public void testInvalidPartitionParameterScan() {
         assertThrows(
                 IllegalArgumentException.class,
-                () -> scan(-1, null)
+                () -> scan(-1, startTx())

Review Comment:
   I would be nice to have validation for that started transactions in order to check that they were aborted in case of RW.



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


Re: [PR] IGNITE-21511 Use read only transaction id in ReadOnlyScanRetrieveBatchReplicaRequest [ignite-3]

Posted by "Cyrill (via GitHub)" <gi...@apache.org>.
Cyrill commented on code in PR #3200:
URL: https://github.com/apache/ignite-3/pull/3200#discussion_r1489376585


##########
modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItAbstractInternalTableScanTest.java:
##########
@@ -287,16 +289,16 @@ public void onComplete() {
     /**
      * Checks that {@link IllegalArgumentException} is thrown in case of invalid partition.
      */
-    @Test()
+    @Test
     public void testInvalidPartitionParameterScan() {
         assertThrows(
                 IllegalArgumentException.class,
-                () -> scan(-1, null)
+                () -> scan(-1, startTx())

Review Comment:
   Actually RW test uses null here. Changed the code to make this more obvious.



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


Re: [PR] IGNITE-21511 Use read only transaction id in ReadOnlyScanRetrieveBatchReplicaRequest [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #3200:
URL: https://github.com/apache/ignite-3/pull/3200#discussion_r1489430419


##########
modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItAbstractInternalTableScanTest.java:
##########
@@ -287,16 +289,16 @@ public void onComplete() {
     /**
      * Checks that {@link IllegalArgumentException} is thrown in case of invalid partition.
      */
-    @Test()
+    @Test
     public void testInvalidPartitionParameterScan() {
         assertThrows(
                 IllegalArgumentException.class,
-                () -> scan(-1, null)
+                () -> scan(-1, startTx())

Review Comment:
   Yep, make sense.



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