You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ibessonov (via GitHub)" <gi...@apache.org> on 2025/11/27 09:32:22 UTC

[PR] IGNITE-27198 Optimize hash index lookup [ignite-3]

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

   https://issues.apache.org/jira/browse/IGNITE-27198
   
   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


Re: [PR] IGNITE-27198 Optimize hash index lookup [ignite-3]

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


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/hash/io/HashIndexTreeIo.java:
##########
@@ -209,19 +205,25 @@ default int compare(DataPageReader dataPageReader, int partitionId, long pageAdd
 
             CompareIndexColumnsValue compareIndexColumnsValue = new CompareIndexColumnsValue();
 
-            dataPageReader.traverse(link, compareIndexColumnsValue, row.indexColumns().valueBuffer().rewind().duplicate());
+            dataPageReader.traverse(link, compareIndexColumnsValue, rowKey.indexColumns().valueBuffer().rewind().duplicate());
 
             cmp = compareIndexColumnsValue.compareResult();
         } else {
             ByteBuffer indexColumnsBuffer = wrapPointer(pageAddr + off + TUPLE_OFFSET, indexColumnsSize);
 
-            cmp = indexColumnsBuffer.compareTo(row.indexColumns().valueBuffer().rewind());
+            cmp = indexColumnsBuffer.compareTo(rowKey.indexColumns().valueBuffer().rewind());
         }
 
         if (cmp != 0) {
             return cmp;
         }
 
+        if (!(rowKey instanceof HashIndexRow)) {

Review Comment:
   What else can it be?



##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/index/AbstractIndexStorageTest.java:
##########
@@ -244,57 +241,6 @@ public void testGet() {
         assertThat(getAll(index, row4), is(empty()));
     }
 
-    @Test
-    public void testGetConcurrentPut() {

Review Comment:
   Why did you remove these tests?



-- 
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-27198 Optimize hash index lookup [ignite-3]

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


##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/index/AbstractIndexStorageTest.java:
##########
@@ -244,57 +241,6 @@ public void testGet() {
         assertThat(getAll(index, row4), is(empty()));
     }
 
-    @Test
-    public void testGetConcurrentPut() {

Review Comment:
   Some tests no longer work? Why is that ok?



-- 
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-27198 Optimize hash index lookup [ignite-3]

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


##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/index/AbstractIndexStorageTest.java:
##########
@@ -244,57 +241,6 @@ public void testGet() {
         assertThat(getAll(index, row4), is(empty()));
     }
 
-    @Test
-    public void testGetConcurrentPut() {

Review Comment:
   They no longer work



-- 
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-27198 Optimize hash index lookup [ignite-3]

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


-- 
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-27198 Optimize hash index lookup [ignite-3]

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


##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/index/AbstractIndexStorageTest.java:
##########
@@ -244,57 +241,6 @@ public void testGet() {
         assertThat(getAll(index, row4), is(empty()));
     }
 
-    @Test
-    public void testGetConcurrentPut() {

Review Comment:
   Because I changed the code behavior of the method that they test, and their scenarios no longer reflect the reality



-- 
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-27198 Optimize hash index lookup [ignite-3]

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


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/hash/io/HashIndexTreeIo.java:
##########
@@ -209,19 +205,25 @@ default int compare(DataPageReader dataPageReader, int partitionId, long pageAdd
 
             CompareIndexColumnsValue compareIndexColumnsValue = new CompareIndexColumnsValue();
 
-            dataPageReader.traverse(link, compareIndexColumnsValue, row.indexColumns().valueBuffer().rewind().duplicate());
+            dataPageReader.traverse(link, compareIndexColumnsValue, rowKey.indexColumns().valueBuffer().rewind().duplicate());
 
             cmp = compareIndexColumnsValue.compareResult();
         } else {
             ByteBuffer indexColumnsBuffer = wrapPointer(pageAddr + off + TUPLE_OFFSET, indexColumnsSize);
 
-            cmp = indexColumnsBuffer.compareTo(row.indexColumns().valueBuffer().rewind());
+            cmp = indexColumnsBuffer.compareTo(rowKey.indexColumns().valueBuffer().rewind());
         }
 
         if (cmp != 0) {
             return cmp;
         }
 
+        if (!(rowKey instanceof HashIndexRow)) {

Review Comment:
   What else can it be?



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