Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15885

Create SortedIndexStorage based on RocksDB

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Resolved
    • None
    • 3.0.0-alpha4
    • None

    Description

      API

      • Add SortedIndexStorage interface:
      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();
      }
      
      
      • IndexKeyPrefix can contain a smaller number of columns, than the IndexKey, needed for the prefix search.
      public interface IndexKey {
          byte[] asBytes();
      }
      
      public interface IndexKeyPrefix {
          Object[] prefixColumnValues();
      }
      
      • SearchRow is a class from the storage-api that represents a key from the partition storage.

      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.

      Attachments

        Issue Links

          Activity

            People

              apolovtcev Aleksandr Polovtsev
              apolovtcev Aleksandr Polovtsev
              Semyon Danilov Semyon Danilov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8h 20m
                  8h 20m