[
https://issues.apache.org/jira/browse/OAK-4504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chetan Mehrotra updated OAK-4504:
---------------------------------
Labels: candidate_oak_1_0 candidate_oak_1_2 candidate_oak_1_4 (was: )
> 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)