HQebupt commented on code in PR #16543: URL: https://github.com/apache/pulsar/pull/16543#discussion_r919059271
########## managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java: ########## @@ -3283,4 +3283,12 @@ public void setState(State state) { public ManagedLedgerConfig getConfig() { return config; } + + /** + * check cursor reset status + * @return true if the cursor reset in progress + */ + public boolean resetCursorInProgress() { + return RESET_CURSOR_IN_PROGRESS_UPDATER.get(this) == TRUE; Review Comment: ``` public static final int FALSE = 0; public static final int TRUE = 1; private static final AtomicIntegerFieldUpdater<ManagedCursorImpl> RESET_CURSOR_IN_PROGRESS_UPDATER = AtomicIntegerFieldUpdater.newUpdater(ManagedCursorImpl.class, "resetCursorInProgress"); @SuppressWarnings("unused") private volatile int resetCursorInProgress = FALSE; ``` I submit a wrong code. Anyway, `resetCursorInProgress` is `int` type instead of `boolean`. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org