imbajin commented on code in PR #832:
URL: 
https://github.com/apache/hugegraph-toolchain/pull/832#discussion_r4350414346


##########
hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/service/graphs/GraphsService.java:
##########
@@ -461,12 +506,29 @@ public static String getStatisticsKey(String graphSpace, 
String graph) {
     public GraphStatisticsEntity getStatistics(HugeClient client,
                                                String graphSpace,
                                                String graph) {
-        GraphStatisticsEntity result;
-        // Only invalidate the cache entry of the current graph
-        this.graphStatistics.remove(getStatisticsKey(graphSpace, graph));
-        result = postSmallStatistics(client, graphSpace, graph);
+        String key = this.statisticsKey(client, graphSpace, graph);
+        if (key == null) {
+            // Snapshot reuse requires a stable target, identity and current 
policy.
+            return this.collectBoundedStatistics(client);
+        }
+        try {
+            return this.boundedStatistics.get(key, () -> 
this.collectBoundedStatistics(client));

Review Comment:
   Rechecked at 6831d3e9d0bfbaf8a140c46ab5db5b49a458216d: approximation 
metadata now reaches the actual statistics consumers. A cached zero no longer 
disables Louvain or declares the graph empty. Zero can remain cached and 
displayed approximately; the repair changes the UI inference rather than 
invalidating the zero cache, preserving the intended snapshot reuse. This 
resolves the reported harmful cached-zero inference only; current-head CI and 
full acceptance remain separate.



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