[
https://issues.apache.org/jira/browse/IGNITE-21606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirill Tkalenko updated IGNITE-21606:
-------------------------------------
Description:
Consider the following test scenario:
# Create a table with two columns.
# We insert into this table.
# Add a column to the table.
# Create an index on the new column.
# We make a “select” with a condition on the new column.
We get an error:
{noformat}
[2024-02-26T11:30:37,822][WARN
][%ibiont_n_0%scan-query-executor-0][ReplicaManager] Failed to process replica
request [request=ReadOnlyScanRetrieveBatchReplicaRequestImpl [batchSize=100,
columnsToInclude={0, 1, 2, 3}, exactKey=null, flags=3, groupId=7_part_0,
indexToUse=10, lowerBoundPrefix=BinaryTupleMessageImpl [elementCount=1,
tuple=java.nio.HeapByteBuffer[pos=0 lim=9 cap=9]],
readTimestampLong=111996845269843968, scanId=1,
transactionId=018de489-92b1-0000-41c5-8f6500000001,
upperBoundPrefix=BinaryTupleMessageImpl [elementCount=1,
tuple=java.nio.HeapByteBuffer[pos=0 lim=9 cap=9]]]].
java.util.concurrent.CompletionException: java.lang.AssertionError:
schemaVersion=1, column=SURNAME
at
java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
[?:?]
at
java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
[?:?]
at
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1081)
[?:?]
at
java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.AssertionError: schemaVersion=1, column=SURNAME
at
org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.resolveColumnIndexes(IndexManager.java:289)
~[main/:?]
at
org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.createConverter(IndexManager.java:276)
~[main/:?]
at
org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.converter(IndexManager.java:262)
~[main/:?]
at
org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.extractColumns(IndexManager.java:249)
~[main/:?]
at
org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.indexRowMatches(PartitionReplicaListener.java:1369)
~[main/:?]
at
org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.lambda$continueReadOnlyIndexScan$51(PartitionReplicaListener.java:1295)
~[main/:?]
at
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
~[?:?]
... 4 more
{noformat}
This happens because when filtering index scans (IGNITE-18518), we do not
update the tuple to the required schema version.
Look TODOs in the code.
We also need to understand which schema version to use to update the tuple.
was:
Consider the following test scenario:
# Create a table with two columns.
# We insert into this table.
# Add a column to the table.
# Create an index on the new column.
# We make a “select” with a condition on the new column.
We get an error:
{noformat}
[2024-02-26T11:30:37,822][WARN
][%ibiont_n_0%scan-query-executor-0][ReplicaManager] Failed to process replica
request [request=ReadOnlyScanRetrieveBatchReplicaRequestImpl [batchSize=100,
columnsToInclude={0, 1, 2, 3}, exactKey=null, flags=3, groupId=7_part_0,
indexToUse=10, lowerBoundPrefix=BinaryTupleMessageImpl [elementCount=1,
tuple=java.nio.HeapByteBuffer[pos=0 lim=9 cap=9]],
readTimestampLong=111996845269843968, scanId=1,
transactionId=018de489-92b1-0000-41c5-8f6500000001,
upperBoundPrefix=BinaryTupleMessageImpl [elementCount=1,
tuple=java.nio.HeapByteBuffer[pos=0 lim=9 cap=9]]]].
java.util.concurrent.CompletionException: java.lang.AssertionError:
schemaVersion=1, column=SURNAME
at
java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
[?:?]
at
java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
[?:?]
at
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1081)
[?:?]
at
java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.AssertionError: schemaVersion=1, column=SURNAME
at
org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.resolveColumnIndexes(IndexManager.java:289)
~[main/:?]
at
org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.createConverter(IndexManager.java:276)
~[main/:?]
at
org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.converter(IndexManager.java:262)
~[main/:?]
at
org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.extractColumns(IndexManager.java:249)
~[main/:?]
at
org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.indexRowMatches(PartitionReplicaListener.java:1369)
~[main/:?]
at
org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.lambda$continueReadOnlyIndexScan$51(PartitionReplicaListener.java:1295)
~[main/:?]
at
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
~[?:?]
... 4 more
{noformat}
This happens because when filtering index scans (IGNITE-18518), we do not
update the tuple to the required schema version.
Look TODOs in the code.
> Missing tuple update during filtering index scans
> -------------------------------------------------
>
> Key: IGNITE-21606
> URL: https://issues.apache.org/jira/browse/IGNITE-21606
> Project: Ignite
> Issue Type: Bug
> Reporter: Kirill Tkalenko
> Priority: Major
> Labels: ignite-3
>
> Consider the following test scenario:
> # Create a table with two columns.
> # We insert into this table.
> # Add a column to the table.
> # Create an index on the new column.
> # We make a “select” with a condition on the new column.
> We get an error:
> {noformat}
> [2024-02-26T11:30:37,822][WARN
> ][%ibiont_n_0%scan-query-executor-0][ReplicaManager] Failed to process
> replica request [request=ReadOnlyScanRetrieveBatchReplicaRequestImpl
> [batchSize=100, columnsToInclude={0, 1, 2, 3}, exactKey=null, flags=3,
> groupId=7_part_0, indexToUse=10, lowerBoundPrefix=BinaryTupleMessageImpl
> [elementCount=1, tuple=java.nio.HeapByteBuffer[pos=0 lim=9 cap=9]],
> readTimestampLong=111996845269843968, scanId=1,
> transactionId=018de489-92b1-0000-41c5-8f6500000001,
> upperBoundPrefix=BinaryTupleMessageImpl [elementCount=1,
> tuple=java.nio.HeapByteBuffer[pos=0 lim=9 cap=9]]]].
> java.util.concurrent.CompletionException: java.lang.AssertionError:
> schemaVersion=1, column=SURNAME
> at
> java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
> [?:?]
> at
> java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
> [?:?]
> at
> java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1081)
> [?:?]
> at
> java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
> [?:?]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> [?:?]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> [?:?]
> at java.lang.Thread.run(Thread.java:834) [?:?]
> Caused by: java.lang.AssertionError: schemaVersion=1, column=SURNAME
> at
> org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.resolveColumnIndexes(IndexManager.java:289)
> ~[main/:?]
> at
> org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.createConverter(IndexManager.java:276)
> ~[main/:?]
> at
> org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.converter(IndexManager.java:262)
> ~[main/:?]
> at
> org.apache.ignite.internal.index.IndexManager$TableRowToIndexKeyConverter.extractColumns(IndexManager.java:249)
> ~[main/:?]
> at
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.indexRowMatches(PartitionReplicaListener.java:1369)
> ~[main/:?]
> at
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.lambda$continueReadOnlyIndexScan$51(PartitionReplicaListener.java:1295)
> ~[main/:?]
> at
> java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
> ~[?:?]
> ... 4 more
> {noformat}
> This happens because when filtering index scans (IGNITE-18518), we do not
> update the tuple to the required schema version.
> Look TODOs in the code.
> We also need to understand which schema version to use to update the tuple.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)