jchen21 commented on a change in pull request #6104:
URL: https://github.com/apache/geode/pull/6104#discussion_r592643571
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedPutAllOperation.java
##########
@@ -814,6 +817,23 @@ protected FilterRoutingInfo getRecipientFilterRouting(Set
cacheOpRecipients) {
return consolidated;
}
+ @Override
+ void doRemoveDestroyTokensFromCqResultKeys(FilterInfo filterInfo, ServerCQ
cq) {
+ for (Map.Entry<Long, Integer> e : filterInfo.getCQs().entrySet()) {
+ Long cqID = e.getKey();
+ // For the CQs satisfying the event with destroy CQEvent, remove
+ // the entry from CQ cache.
+ for (int i = 0; i < this.putAllData.length; i++) {
+ @Unretained
+ EntryEventImpl entryEvent = getEventForPosition(i);
+ if (entryEvent != null && entryEvent.getKey() != null && cq != null
+ && cq.getFilterID() != null && cq.getFilterID().equals(cqID)
+ && e.getValue() != null &&
e.getValue().equals(MessageType.LOCAL_DESTROY)) {
+ cq.removeFromCqResultKeys(entryEvent.getKey(), true);
+ }
+ }
+ }
+ }
Review comment:
I don't think it is necessary to pass the length of `putAllData` as a
parameter. `putAllData` is a field of `DistributedPutAllOperation`. We can
easily get its length without getting it from a parameter. Maybe I am missing
something you proposed.
For code refactoring with a common class of `DistributedRemoveAllOperation`
and `DistributedPutAllOperation`, if necessary, it would be better to do it in
another pull request. This pull request focuses on fixing the bug.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]