bitflicker64 commented on code in PR #3469:
URL: https://github.com/apache/hugegraph/pull/3469#discussion_r4505077087


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java:
##########
@@ -406,7 +406,9 @@ protected QueryResults<HugeEdge> fetchEdgeBatch(Query 
query) {
         }
         QueryResults<HugeEdge> fetched = super.fetchEdgeBatch(query);
         if (!fetched.batches().hasNext()) {
-            this.cacheEdgeBatch(cacheKey, batchLabel, Collections.emptyList());
+            // An empty backend response may be transient (for example while

Review Comment:
   Important: this drops negative caching on every backend, so each repeat 
lookup of an empty adjacency, such as the empty side of a `BOTH` query or a 
leaf vertex in `kout`, reads the backend again even on RocksDB, where an empty 
read is authoritative. Keep caching empty batches on backends other than 
`hstore`, so only the backend with transient empty reads loses the cache hit.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to