[ https://issues.apache.org/jira/browse/OAK-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15094001#comment-15094001 ]
Thomas Mueller commented on OAK-3694: ------------------------------------- An alternative to this approach, the following algorithm works and does not require Oak changes. Also, it works with multiple async index threads (async, async-fulltext,...): * Create a node with a random name and text, for example "/tmp/test-3ee3fafa-3aee-4402-ac9c-3895bccc85ef", with properties for each sync index type, for example "content" = "3ee3fafa-3aee-4402-ac9c-3895bccc85ef" and "desc" = "3ee3fafa-3aee-4402-ac9c-3895bccc85ef". * Search for that node using a query that uses the async index, if not successful wait one second retry until timeout * Search for that node using a query that uses the async-fulltext index, if not successful wait one second retry until timeout * Delete the node > As a user, I want to know when a node that I've created has been indexed. > ------------------------------------------------------------------------- > > Key: OAK-3694 > URL: https://issues.apache.org/jira/browse/OAK-3694 > Project: Jackrabbit Oak > Issue Type: Story > Reporter: Valentin Olteanu > Assignee: Chetan Mehrotra > Fix For: 1.4 > > > As a user, I want to know when a node that I've created has been indexed so > that I can start using it. > Generalization: As a user, I want to know when everything created before > timestamp T0 has been indexed. > Ideal solution: MBean operation {{bool isIndexedBefore(long timestamp)}} that > returns {{true}} if everything created before {{timestamp}} has been indexed > (by all indexers). > Current options: > # check IndexStatsMBean for Start and Done to determine if a cycle has > started after adding the node and has finished. Issue: there can be multiple > async indexers. OAK-3606 proposes a solution. > # add a node and search for it until it is retrieved. Issue: must add > different nodes for different indexers and wait for all. > These options are not precise (give false positives) and are not resilient to > changes in indexing strategy (e.g. adding one more indexer breaks the > checks). -- This message was sent by Atlassian JIRA (v6.3.4#6332)