You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "Dan Smith (JIRA)" <ji...@apache.org> on 2016/12/19 21:18:58 UTC

[jira] [Created] (GEODE-2230) LuceneIndex.waitUntilFlushed should not have to wait for the queue to be completely empty

Dan Smith created GEODE-2230:
--------------------------------

             Summary: LuceneIndex.waitUntilFlushed should not have to wait for the queue to be completely empty
                 Key: GEODE-2230
                 URL: https://issues.apache.org/jira/browse/GEODE-2230
             Project: Geode
          Issue Type: Improvement
          Components: lucene
            Reporter: Dan Smith


We added a function to LuceneIndex to wait until updates are flushed to the index with GEODE-1351.

Unfortunately, the current approach has a few problems. It just waits in a loop polling the size of the queue until it reaches zero. If someone uses this method while the system is constantly receiving updates, the queue may never reach zero.

It would be better if this method could wait until any data at the time the method was called was completely flushed.

One way to accomplish this might be to send a function or message to all of the members holding the async event queue for the lucene index. The function could capture the current tail of the queue and wait until that event is dispatched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)