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. (#7402)
  • Loading branch information
jinmeiliao committed Mar 1, 2022
1 parent d9ef0f1 commit 5ed8bd9
Showing 1 changed file with 13 additions and 2 deletions.
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 5ed8bd9

Please sign in to comment.