You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Owen Nichols (Jira)" <ji...@apache.org> on 2022/06/22 20:47:04 UTC
[jira] [Closed] (GEODE-9734) ClientPublisher has race causing it to never publish a single message
[ https://issues.apache.org/jira/browse/GEODE-9734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Owen Nichols closed GEODE-9734.
-------------------------------
> ClientPublisher has race causing it to never publish a single message
> ---------------------------------------------------------------------
>
> Key: GEODE-9734
> URL: https://issues.apache.org/jira/browse/GEODE-9734
> Project: Geode
> Issue Type: Bug
> Components: redis
> Affects Versions: 1.15.0
> Reporter: Darrel Schneider
> Assignee: Darrel Schneider
> Priority: Major
> Labels: pull-request-available, unreleased
> Fix For: 1.15.0
>
>
> The ClientPublisher has a race condition that can cause it to add a message to the queue but not drain it right away. The msg will never be published unless that client publishes a second message.
> The order of events that cause the race is:
> 1. drainerThread: set active and publishes current batch
> 2. drainerThread: calls batch.fill and gets nothing
> 3. publishThread: adds msg to queue
> 4. publishThread: tests "active" see it is true so it does not call fillBatchIfNeeded
> 5. drainerThread: sets "active" to false
> We now have one msg in the queue that will not be published until we add another msg to the queue.
> This should be easy to fix. All we need to do in the drainerThread is one more check of the queue after setting active to false
--
This message was sent by Atlassian Jira
(v8.20.7#820007)