jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Using DBCursor in MongoDocumentStore
Date Tue, 18 Mar 2014 17:52:46 GMT
Hi,

I was looking into the support for Version GC (OAK-1341). For that I
had a look at BlobReferenceIterator#loadBatchQuery which currently
does a pagination over all Documents which have binaries. The DBCursor
returned by Mongo [1] implements the Iterator contract and would
lazily fetch the next batch.

So had two queries

1. Should we expose the Iterator as part of DocumentStore API and rely
on Mongo to paginate. Probably the ResultSet in DB case can also
easily Iterator pattern

2. Cache Handling - Currently fetching document in such pattern for GC
handling would also overflow the cache. So should we pass an extra
flag to not cache docs from such calls

Chetan Mehrotra
[1] http://api.mongodb.org/java/2.0/com/mongodb/DBCursor.html

Mime
View raw message