tkalkirill commented on code in PR #1839:
URL: https://github.com/apache/ignite-3/pull/1839#discussion_r1149260040
##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/IndexStorage.java:
##########
@@ -49,9 +51,29 @@ public interface IndexStorage {
* <p>Removing a non-existent row is a no-op.
*
* @apiNote This method <b>must</b> always be called inside the
corresponding partition's
- * {@link
org.apache.ignite.internal.storage.MvPartitionStorage#runConsistently} closure.
+ * {@link MvPartitionStorage#runConsistently} closure.
*
* @throws StorageException If failed to remove data.
*/
void remove(IndexRow row) throws StorageException;
+
+ /**
+ * 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 getNextRowIdToBuild();
Review Comment:
But this exception is not checked, there is no need to specify it,
documentation is enough.
I can remove it in other methods, but I think you should not change it.
##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/IndexStorage.java:
##########
@@ -49,9 +51,29 @@ public interface IndexStorage {
* <p>Removing a non-existent row is a no-op.
*
* @apiNote This method <b>must</b> always be called inside the
corresponding partition's
- * {@link
org.apache.ignite.internal.storage.MvPartitionStorage#runConsistently} closure.
+ * {@link MvPartitionStorage#runConsistently} closure.
*
* @throws StorageException If failed to remove data.
*/
void remove(IndexRow row) throws StorageException;
+
+ /**
+ * 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 getNextRowIdToBuild();
Review Comment:
But this exception is not checked, there is no need to specify it,
documentation is enough.
I can remove it in other methods, but I think we should not change it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]