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)
  • Loading branch information
jinmeiliao authored and mhansonp committed Mar 11, 2022
1 parent a548ae6 commit 74af7d4
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 74af7d4

Please sign in to comment.