Konstantin Orlov created IGNITE-28453:
-----------------------------------------

             Summary: Avoid index key materialization during index row 
verification
                 Key: IGNITE-28453
                 URL: https://issues.apache.org/jira/browse/IGNITE-28453
             Project: Ignite
          Issue Type: Improvement
          Components: secondary indexes ai3
            Reporter: Konstantin Orlov
            Assignee: Konstantin Orlov


At the moment, in order to make sure {{IndexRow}} we've just retrieved from 
storage is not leftover from transaction rollback, we extract index key once 
again. The problem is that we materialize BinaryTuple just to do byte 
comparison, and then throw it away:

{code}
    private static boolean indexRowMatches(IndexRow indexRow, BinaryRow 
binaryRow, TableSchemaAwareIndexStorage schemaAwareIndexStorage) {
        BinaryTuple actualIndexRow = 
schemaAwareIndexStorage.indexRowResolver().extractColumns(binaryRow);

        return 
indexRow.indexColumns().byteBuffer().equals(actualIndexRow.byteBuffer());
    }
{code}

It would be better to implement byte comparison avoiding tuple materialization.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to