This is an automated email from the ASF dual-hosted git repository.
alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 82dc1391dd0 IGNITE-19495 Fix failure on sqlOnHeapCache=enabled and
more than one index used - Fixes #10722.
82dc1391dd0 is described below
commit 82dc1391dd045320b20eb2c64cd101bdabffef2b
Author: Aleksey Plekhanov <[email protected]>
AuthorDate: Thu May 18 11:32:22 2023 +0300
IGNITE-19495 Fix failure on sqlOnHeapCache=enabled and more than one index
used - Fixes #10722.
Signed-off-by: Aleksey Plekhanov <[email protected]>
---
.../internal/cache/query/index/sorted/inline/InlineIndexTree.java | 6 ++++--
.../ignite/internal/processors/cache/index/H2RowCacheSelfTest.java | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexTree.java
b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexTree.java
index 6117592324a..928284a174c 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexTree.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexTree.java
@@ -352,8 +352,10 @@ public class InlineIndexTree extends BPlusTree<IndexRow,
IndexRow> {
public IndexRowImpl createIndexRow(long link) throws
IgniteCheckedException {
IndexRowImpl cachedRow = idxRowCache == null ? null :
idxRowCache.get(link);
- if (cachedRow != null)
- return cachedRow;
+ if (cachedRow != null) {
+ return cachedRow.rowHandler() == rowHandler() ? cachedRow :
+ new IndexRowImpl(rowHandler(), cachedRow.cacheDataRow());
+ }
CacheDataRowAdapter row = new CacheDataRowAdapter(link);
diff --git
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java
index ed57ce5f95a..79ad353d9c1 100644
---
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java
+++
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java
@@ -446,7 +446,7 @@ public class H2RowCacheSelfTest extends
AbstractIndexingCommonTest {
*/
private static class Value {
/** Long value. */
- @QuerySqlField
+ @QuerySqlField(index = true)
private long lVal;
/** String value. */