You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "lowka (via GitHub)" <gi...@apache.org> on 2023/09/26 14:52:06 UTC

[GitHub] [ignite-3] lowka opened a new pull request, #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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

   Fixes incorrect schema version of `SchemaDescriptor` in `ExecutableTableRegistry`.
   
   https://issues.apache.org/jira/browse/GNITE-20411
   
   ----
   
   Thank you for submitting the pull request.
   
   To streamline the review process of the patch and ensure better code quality
   we ask both an author and a reviewer to verify the following:
   
   ### The Review Checklist
   - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:  
   \- There is a single JIRA ticket related to the pull request.  
   \- The web-link to the pull request is attached to the JIRA ticket.  
   \- The JIRA ticket has the Patch Available state.  
   \- The description of the JIRA ticket explains WHAT was made, WHY and HOW.  
   \- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
   - [ ] **Design:** new code conforms with the design principles of the components it is added to.
   - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
   - [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
   - [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
   
   ### Notes
   - [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)


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


[GitHub] [ignite-3] lowka commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   Removed this test.



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


[GitHub] [ignite-3] xtern commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   I ran this test 10 times on the main branch  without failures... so I'm not sure that multithreading is working properly here.



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


[GitHub] [ignite-3] lowka commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +675,32 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testTransactionFailsToCommitWhenDetectsSchemaChange() {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {
+            sql("INSERT INTO TEST (id, val0) VALUES (?, ?)", 1, 1);

Review Comment:
   Fixed.



-- 
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-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper [ignite-3]

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


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


[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutableTableRegistryImpl.java:
##########
@@ -78,21 +78,16 @@ public void onSchemaUpdated() {
         tableCache.clear();

Review Comment:
   I think we no longer need to call `cache.clear()`,
   because cache key contains version  and previous versions are immutable.
   



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


[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +675,32 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testTransactionFailsToCommitWhenDetectsSchemaChange() {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {
+            sql("INSERT INTO TEST (id, val0) VALUES (?, ?)", 1, 1);

Review Comment:
   Do you mean this statement should be run before "ALTER table?
   There is no such guarantee, as async task may starts after "ALTER TABLE"
   
   Maybe an explicit transaction, which spans over both INSERTS should be started?
   



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


[GitHub] [ignite-3] xtern commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   I ran this test 10 times on the main branch  without failures... so I'm not sure that multithreading is working as expected here.
   I suggest either somehow modify the test so that it reproduces the original error, or remove multithreading completely.



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


[GitHub] [ignite-3] lowka commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutableTableRegistryImpl.java:
##########
@@ -78,21 +78,16 @@ public void onSchemaUpdated() {
         tableCache.clear();

Review Comment:
   No body calls SchemaUpdateListener anymore - removed 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: notifications-unsubscribe@ignite.apache.org

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


[GitHub] [ignite-3] xtern commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   > somehow modify the test so that it reproduces the original error,
   it seems impossible to make a stable test for the original error :pensive:  so we can probably leave the current implementation in the hope that it will catch something someday.



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   > somehow modify the test so that it reproduces the original error,
   
   it seems impossible to make a stable test for the original error :pensive:  so we can probably leave the current implementation in the hope that it will catch something someday.



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


[GitHub] [ignite-3] xtern commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   > somehow modify the test so that it reproduces the original error,
   
   it seems impossible to make a stable test for the original error :pensive:  so we can probably leave the current test implementation in the hope that it will catch something someday.



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


[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutableTableRegistryImpl.java:
##########
@@ -78,21 +78,16 @@ public void onSchemaUpdated() {
         tableCache.clear();
     }
 
-    private CompletableFuture<ExecutableTable> loadTable(int tableId, TableDescriptor tableDescriptor) {
-        CompletableFuture<Map.Entry<InternalTable, SchemaRegistry>> f = tableManager.tableAsync(tableId)
-                .thenApply(table -> {
-                    InternalTable internalTable = table.internalTable();
-                    SchemaRegistry schemaRegistry = schemaManager.schemaRegistry(tableId);
-                    return Map.entry(internalTable, schemaRegistry);
-                });
-
-        return f.thenApply((table) -> {
-            SchemaRegistry schemaRegistry = table.getValue();
-            SchemaDescriptor schemaDescriptor = schemaRegistry.schema();
+    private CompletableFuture<ExecutableTable> loadTable(int tableId, int tableVersion, TableDescriptor tableDescriptor) {
+        CompletableFuture<InternalTable> f = tableManager.tableAsync(tableId).thenApply(TableImpl::internalTable);
+
+        return f.thenApply((internalTable) -> {

Review Comment:
   Maybe we should get this continuation back to the SQL execution pool.



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


[GitHub] [ignite-3] xtern commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   In theory, we can check “either there was such an exception or there was no exception at all”
   
   ```
           sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
   
           CyclicBarrier barrier = new CyclicBarrier(2);
   
           CompletableFuture<?> upsertFut = IgniteTestUtils.runAsync(() -> {
   
               barrier.await();
   
               sql("INSERT INTO TEST (id, val0) VALUES (?, ?)", 0, 0);
           });
   
           barrier.await();
   
           sql("ALTER TABLE TEST ADD COLUMN VAL1 INT DEFAULT -1");
   
           try {
               upsertFut.get();
           } catch (ExecutionException e) {
               Throwable origin = e.getCause();
   
               assertThat(origin.getClass(), equalTo(IgniteException.class));
               assertThat(origin.getMessage(), containsString("Table schema was updated after the transaction was started"));
           }
   ```
   
   such a test should not be flaky, and it is currently reproduces the problem on the main branch :thinking: 



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   In theory, we can check “either there was such an exception or there was no exception at all”
   
   ```
           sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
   
           CyclicBarrier barrier = new CyclicBarrier(2);
   
           CompletableFuture<?> upsertFut = IgniteTestUtils.runAsync(() -> {
   
               barrier.await();
   
               sql("INSERT INTO TEST (id, val0) VALUES (?, ?)", 0, 0);
           });
   
           barrier.await();
   
           sql("ALTER TABLE TEST ADD COLUMN VAL1 INT DEFAULT -1");
   
           try {
               upsertFut.get();
           } catch (ExecutionException e) {
               Throwable origin = e.getCause();
   
               assertThat(origin.getClass(), equalTo(IgniteException.class));
               assertThat(origin.getMessage(), containsString("Table schema was updated after the transaction was started"));
           }
   ```
   
   such a test should not be flaky, and it is currently reproduces the problem on the main branch :thinking: 



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


[GitHub] [ignite-3] xtern commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);
+
+        CompletableFuture<Void> upsertFut = CompletableFuture.runAsync(() -> {

Review Comment:
   I ran this test 10 times on the main branch  without failures... so I'm not sure if multithreading is working properly here.



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


[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -672,6 +676,39 @@ public void testDeleteUsingCompositePk() {
         assertQuery("SELECT d FROM test").returnNothing().check();
     }
 
+    @Test
+    public void testOperationFailsToCommitWhenDetectsSchemaChange() throws InterruptedException {
+        sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
+
+        CountDownLatch startDml = new CountDownLatch(1);
+        CountDownLatch latch = new CountDownLatch(1);

Review Comment:
   can be replaced with barrier.
   ```suggestion
           CyclicBarrier barrier = new CyclicBarrier(2);
   ```



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


[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2634: IGNITE-20411 IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

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


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutableTableRegistryImpl.java:
##########
@@ -78,21 +78,16 @@ public void onSchemaUpdated() {
         tableCache.clear();
     }
 
-    private CompletableFuture<ExecutableTable> loadTable(int tableId, TableDescriptor tableDescriptor) {
-        CompletableFuture<Map.Entry<InternalTable, SchemaRegistry>> f = tableManager.tableAsync(tableId)
-                .thenApply(table -> {
-                    InternalTable internalTable = table.internalTable();
-                    SchemaRegistry schemaRegistry = schemaManager.schemaRegistry(tableId);
-                    return Map.entry(internalTable, schemaRegistry);
-                });
-
-        return f.thenApply((table) -> {
-            SchemaRegistry schemaRegistry = table.getValue();
-            SchemaDescriptor schemaDescriptor = schemaRegistry.schema();
+    private CompletableFuture<ExecutableTable> loadTable(int tableId, int tableVersion, TableDescriptor tableDescriptor) {
+        CompletableFuture<InternalTable> f = tableManager.tableAsync(tableId).thenApply(TableImpl::internalTable);
+
+        return f.thenApply((internalTable) -> {

Review Comment:
   Maybe we should get this continuation back to the SQL execution pool.



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