Kirill Tkalenko created IGNITE-19119:
----------------------------------------

             Summary: Prepare 
org.apache.ignite.internal.storage.index.IndexStorage to build index
                 Key: IGNITE-19119
                 URL: https://issues.apache.org/jira/browse/IGNITE-19119
             Project: Ignite
          Issue Type: Improvement
            Reporter: Kirill Tkalenko
            Assignee: Kirill Tkalenko
             Fix For: 3.0.0-beta2


We need to prepare the store (and its implementations) for index building.
We need the ability to save and retrieve the row ID for which we want to build 
an index.
I propose the following design:
{code:java}
public interface IndexStorage {
    ...
    /**
     * Returns the row ID for which the index needs to be built, {@code null} 
means that the index building has completed.
     *
     * <p>If index building has not started yet, it will return {@link 
RowId#lowestRowId(int)}.
     *
     * @throws StorageException If failed to get the row ID.
     */
    @Nullable RowId getRowIdToBuilt();

    /**
     * Sets the row ID for which the index needs to be built, {@code null} 
means that the index is built.
     *
     * @apiNote This method <b>must</b> always be called inside the 
corresponding partition's
     *     {@link 
org.apache.ignite.internal.storage.MvPartitionStorage#runConsistently} closure.
     * 
     * @param rowId Row ID.
     * @throws StorageException If failed to set the row ID.
     */
    void setRowIdToBuilt(@Nullable RowId rowId);
}
{code}




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

Reply via email to