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


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java:
##########
@@ -318,8 +400,10 @@ protected void updateSchema(SchemaElement schema,
         super.updateSchema(schema, updateCallback);
 
         this.updateCache(schema);
-        // Status transitions are internal bookkeeping; notifying here causes a
-        // broadcast storm for every updateSchemaStatus() call from background 
jobs.
+        // No meta event here: one per updateSchemaStatus() call from 
background
+        // jobs would be a broadcast storm. The schema version has no fan-out,
+        // other servers check it at most once per reconcile interval.
+        this.bumpSchemaVersion();

Review Comment:
   7f5672a7: correction to the above. Skipping the update was wrong. The 
reconciler also clears on this server's own version writes, so a reader could 
cache the old element after that clear and the skip left it there. hstore CI 
caught it: an index label stayed CREATING after its rebuild set CREATED 
(`IndexLabelCoreTest.testAddIndexLabelOfEdgeWithEdgeExist`, 
`VertexCoreTest.testQueryByDatePropertyInString`). On a generation change 
`updateCache()` now invalidates the element and resets its type's cached-all 
flag, so the next read loads it from storage. Test renamed to 
`testV2LocalWriteIsDroppedAcrossRemoteClear`. hstore core-test (816 run, 0 
errors) and unit (775 run, 0 failures) pass on Java 11.
   



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