[
https://issues.apache.org/jira/browse/GEODE-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16003725#comment-16003725
]
ASF GitHub Bot commented on GEODE-2900:
---------------------------------------
Github user upthewaterspout commented on a diff in the pull request:
https://github.com/apache/geode/pull/502#discussion_r115623329
--- Diff:
geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegionQueue.java
---
@@ -71,10 +73,10 @@
private final Map indexes;
/**
- * A transient queue to maintain the eventSeqNum of the events that are
to be sent to remote site.
- * It is cleared when the queue is cleared.
+ * A transient deque, but should be treated like as a fifo queue to
maintain the eventSeqNum of
+ * the events that are to be sent to remote site. It is cleared when the
queue is cleared.
*/
- private final BlockingQueue<Object> eventSeqNumQueue = new
LinkedBlockingQueue<Object>();
+ private final BlockingDeque<Object> eventSeqNumDeque = new
LinkedBlockingDeque<Object>();
--- End diff --
Does this really have to be a Deque of type Object?? Don't we know what
type of objects we are putting in here?
> BucketRegionQueue transitions from primary/secondary/primary can lead to
> events lingering in queue
> --------------------------------------------------------------------------------------------------
>
> Key: GEODE-2900
> URL: https://issues.apache.org/jira/browse/GEODE-2900
> Project: Geode
> Issue Type: Bug
> Components: lucene, wan
> Reporter: Jason Huynh
> Assignee: Jason Huynh
>
> In this scenario when peek() is called from BucketRegionQueue, a side effect
> is that the key is removed from the eventSeqNumQueue and an event is placed
> into the peekedEvents list.
> If there is failure dispatching the event, we add the peekedEvents list to a
> new peekedEvents list. Before doing so, we remove any events that we are not
> primary for. Now the event is not in the eventSeqNumQueue or the
> peekedEvents list
> If we now become primary (before the other node could dispatch this event),
> and because we do not have that event in the eventSeqNumQueue or the
> peekedEvents, it gets "stuck."
> This also affects the Lucene implementation. An stuck event can mean
> incorrectly indexed data or data inconsistencies
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)