You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2019/07/10 14:20:00 UTC

[jira] [Resolved] (OAK-4504) Retry query with index hint for query involving _modified and _id

     [ https://issues.apache.org/jira/browse/OAK-4504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger resolved OAK-4504.
-----------------------------------
    Resolution: Won't Fix

Resolving as Won't Fix. As mentioned in the description, with Oak 1.4 a compound index on _id and _modified was added, which should be picked automatically by MongoDB. Please re-open this issue if there are reports that MongoDB picked the wrong index for these kind of queries on recent Oak versions.

> 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
>            Priority: Major
>              Labels: candidate_oak_1_0, candidate_oak_1_2, candidate_oak_1_4
>
> 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
(v7.6.3#76005)