agingade commented on a change in pull request #7487:
URL: https://github.com/apache/geode/pull/7487#discussion_r835667299
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
##########
@@ -526,21 +526,36 @@ public boolean hasSeenEvent(EntryEventImpl event) {
isDuplicate = getEventTracker().hasSeenEvent(event);
if (isDuplicate) {
markEventAsDuplicate(event);
+ if (event.getVersionTag() == null &&
event.getRegion().getConcurrencyChecksEnabled()
Review comment:
We could move all this checks to findAndSetVersionTag()
Then, it will be:
public boolean hasSeenEvent(EntryEventImpl event) {
boolean isDuplicate;
isDuplicate = getEventTracker().hasSeenEvent(event);
if (isDuplicate) {
markEventAsDuplicate(event);
}
if (event.isPossibleDuplicate()) {
findAndSetVersionTag(event);
}
return isDuplicate;
}
void findAndSetVersionTag(EntryEventImpl event) {
if (event.isPossibleDuplicate() &&
event.getRegion().getConcurrencyChecksEnabled()
&& event.getVersionTag() == null && event.getEventId() != null) {
boolean isBulkOp = event.getOperation().isPutAll() ||
event.getOperation().isRemoveAll();
VersionTag tag =
FindVersionTagOperation.findVersionTag(event.getRegion(),
event.getEventId(), isBulkOp);
if (tag == null) {
logger.info("No version tag can be found in cluster when retrying
the following event {}",
event);
}
event.setVersionTag(tag);
}
}
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]