tkalkirill commented on code in PR #4602:
URL: https://github.com/apache/ignite-3/pull/4602#discussion_r1808594391
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/ReadOperationForCompactionTracker.java:
##########
@@ -36,17 +36,23 @@
* <p>Expected usage:</p>
* <ul>
* <li>Before starting execution, the reading command invoke {@link
#track} with its ID and the compaction revision that is currently
- * set ({@link
MetaStorageCompactionManager#setCompactionRevisionLocally}/{@link
KeyValueStorage#setCompactionRevision}).</li>
+ * set ({@link KeyValueStorage#setCompactionRevision}).</li>
* <li>After completion, the reading command will invoke {@link #untrack}
with the same arguments as when calling {@link #track},
* regardless of whether the operation was successful or not.</li>
* <li>{@link #collect} will be invoked only after a new compaction
revision has been set
- * ({@link
MetaStorageCompactionManager#setCompactionRevisionLocally}/{@link
KeyValueStorage#setCompactionRevision}) for a new
- * compaction revision.</li>
+ * ({@link KeyValueStorage#setCompactionRevision}) for a new compaction
revision.</li>
* </ul>
*/
public class ReadOperationForCompactionTracker {
private final Map<ReadOperationKey, CompletableFuture<Void>>
readOperationFutureByKey = new ConcurrentHashMap<>();
+ private final AtomicLong longOperationIdGenerator = new AtomicLong();
+
+ /** Generates the next read operation ID. Thread-safe. */
+ public long generateLongReadOperationId() {
Review Comment:
The return type is "long", can you suggest a better name?
--
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]