[ https://issues.apache.org/jira/browse/IGNITE-15885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17459245#comment-17459245 ]
Semyon Danilov commented on IGNITE-15885: ----------------------------------------- LGTM! Thanks for the contribution, merged to the main branch. > Create SortedIndexStorage based on RocksDB > ------------------------------------------ > > Key: IGNITE-15885 > URL: https://issues.apache.org/jira/browse/IGNITE-15885 > Project: Ignite > Issue Type: Task > Reporter: Aleksandr Polovtcev > Assignee: Aleksandr Polovtcev > Priority: Major > Labels: ignite-3 > Time Spent: 7.5h > Remaining Estimate: 0h > > h1. API > * Add {{SortedIndexStorage}} interface: > {code:java} > public interface SortedIndexStorage extends AutoCloseable { > /** Index key factory */ > IndexKeyFactory indexKeyFactory(); > /** Index descriptor */ > SortedIndexDescriptor indexDescriptor(); > /** Adds a value */ > void put(IndexKey key, SearchRow value); > /** Removes a value */ > void remove(IndexKey key); > /** Range scan */ > Cursor<SearchRow> range(IndexKeyPrefix lowerBound, IndexKeyPrefix > upperBound); > /** Removes all values */ > void destroy(); > } > {code} > * {{IndexKeyPrefix}} can contain a smaller number of columns, than the > {{IndexKey}}, needed for the prefix search. > {code:java} > public interface IndexKey { > byte[] asBytes(); > } > public interface IndexKeyPrefix { > Object[] prefixColumnValues(); > } > {code} > * {{SearchRow}} is a class from the {{storage-api}} that represents a key > from the partition storage. > h1. Implementation details > For the initial implementation it is suggested to use {{BinaryRow}} > serialization mechanism (it is proposed to implement the {{IndexKey}} on top > of it, simply ignoring the value bytes) to store it in RocksDB. First > implementation will also use a naive comparator, that will convert each > {{BinaryRow}} into a {{Row}} and compare individual deserialized columns. > It is also proposed to store partition storage keys as values in the index > storage. -- This message was sent by Atlassian Jira (v8.20.1#820001)