Hi, >> OK, so can we put what's needed into the DocumentStore API, or alternatively have an extension interface, that both MongoDocumentStore and RDBDocumentStore could implement?
It would make sense to add a generic method which queries on a particular property(possibly limiting to only indexed ones), like below, to the DocumentStore interface. <T extends Document> List<T> queryProperty(Collection<T> collection, String indexedProperty, String fromKey, String toKey, int limit); Thoughts? Thanks Amit On Tue, Aug 26, 2014 at 12:03 PM, Julian Reschke < julian.resc...@greenbytes.de> wrote: > On 2014-08-26 08:03, Amit Jain wrote: > >> Hi Julian, >> >> The LastRevRecoveryAgent is executed at 2 places >> 1. On DocumentNodeStore startup where the MissingLastRevSeeker is used to >> get potential candidates for recovery. >> 2. At regular intervals defined by the property >> 'lastRevRecoveryJobIntervalInSecs' in the DocumentNodeStoreService >> (default >> 60 seconds). Short description is that MissingLastRevSeeker will be called >> rarely in this case. >> Long description - In this case a less expensive query is executed to find >> out all the stale clusterNodes for which recovery is to be performed. If >> there are clusterNodes that have unexpectedly shutdown and their >> 'leaseEndTime' has not expired then MissingLastRevSeeker will check all >> potential candidates. >> >> Proposal: if this code *is* used regularly, we'll need an API so that >>>> >>> DocumentStore implementations other than Mongo can optimize the query. >> +1. Since, It will be executed on every startup. RDBDocumentStore already >> maintains the index on _modified property so, optimized querying is >> possible. >> >> Thanks >> Amit >> > > OK, so can we put what's needed into the DocumentStore API, or > alternatively have an extension interface, that both MongoDocumentStore and > RDBDocumentStore could implement? > > Best regards, Julian >