You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksandr Polovtcev (Jira)" <ji...@apache.org> on 2021/12/11 11:42:00 UTC
[jira] [Updated] (IGNITE-15885) Create SortedIndexStorage based on RocksDB
[ https://issues.apache.org/jira/browse/IGNITE-15885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksandr Polovtcev updated IGNITE-15885:
-----------------------------------------
Summary: Create SortedIndexStorage based on RocksDB (was: Create and implement SortedIndexStorage based on RocksDB)
> 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: 4.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)