dimas-b commented on code in PR #4415:
URL: https://github.com/apache/polaris/pull/4415#discussion_r3235964419
##########
persistence/nosql/persistence/api/src/main/java/org/apache/polaris/persistence/nosql/api/commit/Commits.java:
##########
@@ -28,12 +28,32 @@ public interface Commits {
/**
* Retrieves the commit log in the natural, chronologically reverse order -
most recent commit
* first.
+ *
+ * <p>If {@code offset} is empty, iteration starts at the current head of
{@code refName}.
+ *
+ * <p>If {@code offset} is present, the returned iterator is inclusive of
that commit ID.
Review Comment:
Could you add a note / parameter descriptor to explicitly say that the
optional long value is supposed to be a commit ID rather that a sequential
offset into the commit log?
##########
persistence/nosql/persistence/api/src/main/java/org/apache/polaris/persistence/nosql/api/commit/Commits.java:
##########
@@ -28,12 +28,32 @@ public interface Commits {
/**
* Retrieves the commit log in the natural, chronologically reverse order -
most recent commit
* first.
+ *
+ * <p>If {@code offset} is empty, iteration starts at the current head of
{@code refName}.
+ *
+ * <p>If {@code offset} is present, the returned iterator is inclusive of
that commit ID.
+ * Resolving the offset intentionally performs a linear walk from the
current head toward older
+ * commits until the offset is encountered or visible history ends. This
lookup is not internally
+ * bounded; callers that require a hard limit must enforce it themselves.
Review Comment:
The `callers that require a hard limit must enforce it themselves` seems
obscure... If the method is called and starts walking, the caller does not have
any control to stop this process, does 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]