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

I think this makes sense in general because it makes it easier for an
implementation to lazy load elements. the drawback is that we lose
the size information we currently have with the list. but I think we can
probably live with that...

> 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

probably makes sense. ideally we'd place these kind of aspects in a
separate layer on top of the document store as discussed in OAK-1328
but for now it is probably easier to just extend the existing methods.

Regards
 Marcel

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

Reply via email to