haohao0103 commented on code in PR #2619:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2619#discussion_r1721232127


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java:
##########
@@ -107,44 +107,11 @@ private void listenChanges() {
         };
         
this.graphParams().loadGraphStore().provider().listen(this.storeEventListener);
 
-        // Listen cache event: "cache"(invalid cache item)
-        this.cacheEventListener = event -> {
-            LOG.debug("Graph {} received schema cache event: {}",
-                      this.graph(), event);
-            Object[] args = event.args();
-            E.checkArgument(args.length > 0 && args[0] instanceof String,
-                            "Expect event action argument");
-            if (Cache.ACTION_INVALID.equals(args[0])) {
-                event.checkArgs(String.class, HugeType.class, Id.class);
-                HugeType type = (HugeType) args[1];
-                Id id = (Id) args[2];
-                this.arrayCaches.remove(type, id);
-
-                id = generateId(type, id);
-                Object value = this.idCache.get(id);
-                if (value != null) {
-                    // Invalidate id cache
-                    this.idCache.invalidate(id);
-
-                    // Invalidate name cache
-                    SchemaElement schema = (SchemaElement) value;
-                    Id prefixedName = generateId(schema.type(),
-                                                 schema.name());
-                    this.nameCache.invalidate(prefixedName);
-                }
-                this.resetCachedAll(type);
-                return true;
-            } else if (Cache.ACTION_CLEAR.equals(args[0])) {
-                event.checkArgs(String.class, HugeType.class);
-                this.clearCache(false);
-                return true;
-            }
-            return false;
-        };
-        EventHub schemaEventHub = this.graphParams().schemaEventHub();
-        if (!schemaEventHub.containsListener(Events.CACHE)) {
-            schemaEventHub.listen(Events.CACHE, this.cacheEventListener);
-        }

Review Comment:
   thanks, i can't find the specific error information. could you tell me how 
to locate wehre the error occurred ?



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