[
https://issues.apache.org/jira/browse/OAK-4504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15632019#comment-15632019
]
Marcel Reutegger commented on OAK-4504:
---------------------------------------
Not sure if it is worth the complexity. What if we just let the call fail in
this rare case and then the caller must retry? E.g. the stack trace pasted in
the description of from the async index update which would retry anyway.
> Retry query with index hint for query involving _modified and _id
> -----------------------------------------------------------------
>
> Key: OAK-4504
> URL: https://issues.apache.org/jira/browse/OAK-4504
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mongomk
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Labels: candidate_oak_1_0, candidate_oak_1_2, candidate_oak_1_4
> Fix For: 1.6
>
>
> With OAK-3071 a compound index was added for _modified and _id. Earlier we
> have seen with OAK-1966 that Mongo might not pick correct index and with
> introduction of new index we have seen cases where query times out as Mongo
> picks _id index
> Below stacktrace if from a 1.0.28 Oak version based setup
> {noformat}
> 17.06.2016 08:38:58.255 *WARN* [pool-10-thread-2]
> org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate [async] The index
> update failed
> com.mongodb.MongoExecutionTimeoutException: operation exceeded time limit
> at
> com.mongodb.QueryResultIterator.throwOnQueryFailure(QueryResultIterator.java:211)
> at com.mongodb.QueryResultIterator.init(QueryResultIterator.java:198)
> at
> com.mongodb.QueryResultIterator.initFromQueryResponse(QueryResultIterator.java:176)
> at com.mongodb.QueryResultIterator.<init>(QueryResultIterator.java:64)
> at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:86)
> at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:66)
> at com.mongodb.DBCursor._check(DBCursor.java:458)
> at com.mongodb.DBCursor._hasNext(DBCursor.java:546)
> at com.mongodb.DBCursor.hasNext(DBCursor.java:571)
> at
> org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.queryInternal(MongoDocumentStore.java:585)
> at
> org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.query(MongoDocumentStore.java:516)
> at
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.diffManyChildren(DocumentNodeStore.java:2207)
> {noformat}
> To account for such cases we should add a retry with hint logic
> # Invoke the query normally
> # In case of timeout and if target Mongo has compound index configured retry
> the query with explicit hint
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)