mreutegg commented on code in PR #646:
URL: https://github.com/apache/jackrabbit-oak/pull/646#discussion_r937430348
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java:
##########
@@ -1411,7 +1411,7 @@ public <T extends Document> void prefetch(Collection<T>
collection,
List<String> resultKeys = new ArrayList<>(keys.size());
CacheChangesTracker tracker = null;
if (collection == Collection.NODES) {
- tracker = nodesCache.registerTracker(keys);
+ tracker = nodesCache.registerTracker(new HashSet<>(keys));
Review Comment:
> Is this to remove duplicates?
No, it just registers the given keys with a `CacheChangesTracker`. Order is
not important here. The `CacheChangesTracker` just needs an efficient lookup
whether a key is in this set.
> Possibly it makes sense to sort the entries so that MongoDB can retrieve
them faster
I don't know if that helps and I would only sort if there is evidence that
it is faster.
> I think LZ4 is used?
It _can_ be used. Compression over the wire is a connection
[option](https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/connection/network-compression/#specify-compression-algorithms).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]