Skip to content

Commit

Permalink
[improve][broker]Use cursor.isActive instead to judge if cursor is ac…
Browse files Browse the repository at this point in the history
…tive (apache#19159)

Co-authored-by: gavingaozhangmin <gavingaozhangmin@didiglobal.com>
  • Loading branch information
gaozhangmin and gavingaozhangmin authored Jan 11, 2023
1 parent 0feaa45 commit 78ea7f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3663,7 +3663,7 @@ Pair<PositionImpl, Long> getFirstPositionAndCounter() {

public void activateCursor(ManagedCursor cursor) {
synchronized (activeCursors) {
if (activeCursors.get(cursor.getName()) == null) {
if (!cursor.isActive()) {
Position positionForOrdering = config.isCacheEvictionByMarkDeletedPosition()
? cursor.getMarkDeletedPosition()
: cursor.getReadPosition();
Expand Down

0 comments on commit 78ea7f0

Please sign in to comment.