Skip to content

Commit

Permalink
GEODE-10092: add more logging for future debug when region size gets …
Browse files Browse the repository at this point in the history
…below 0. (apache#7402)

(cherry picked from commit 5ed8bd9)
  • Loading branch information
jinmeiliao committed Mar 1, 2022
1 parent d3e1ca8 commit 0c14807
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2111,9 +2111,20 @@ public int getRegionSize() {
// if this is a client with no tombstones then we subtract the number
// of entries being affected by register-interest refresh
if (imageState.isClient() && !getConcurrencyChecksEnabled()) {
return result - imageState.getDestroyedEntriesCount();
int destroyedEntriesCount = imageState.getDestroyedEntriesCount();
if (result < destroyedEntriesCount) {
logger.error("Incorrect region size: mapSize={}, destroyedEntriesCount={}.", result,
destroyedEntriesCount);
}
return result - destroyedEntriesCount;
}

int tombstoneNumber = tombstoneCount.get();
if (result < tombstoneNumber) {
logger.error("Incorrect region size: mapSize={}, tombstoneCount={}.", result,
tombstoneNumber);
}
return result - tombstoneCount.get();
return result - tombstoneNumber;
}
}

Expand Down

0 comments on commit 0c14807

Please sign in to comment.