bitflicker64 commented on PR #3237:
URL: https://github.com/apache/hugegraph/pull/3237#issuecomment-5855264878

   @imbajin A second, independent review of the design above, checked against 
the code, led to these changes. Nothing else in the design moves.
   
   1. **Read-your-writes on the writer.** A request pins one schema snapshot, 
so a Gremlin script that creates a property key and then a vertex label using 
it would fail: the builder looks the key up in the pinned snapshot 
(`VertexLabelBuilder.java:403-409`). Graph create hits the same path for the 
task schema (`TaskTransaction.java:106-128`). The fix: the TXN reply carries 
`prev_revision`, and the writer applies its own commit to its cache before the 
DDL returns. The request then moves to the new snapshot. This also removes a 
wait of up to 200 ms per DDL for the writer's own frame.
   2. **Tasks wait for their Server.** A rebuild or remove job can run on a 
Server that has not yet seen the label it works on. Rebuild then fails with 
"Undefined index label" (`IndexLabelRebuildJob.java:176-189`), and some remove 
jobs do nothing (`IndexLabelRemoveJob.java:43-47`). The fix: a task reads the 
graph record with a ReadIndex at start and waits until its Server's cache 
covers it.
   3. **Q5 and Q7 are requirements, not options.** Refusing plain writes to 
schema keys once the flag is on (Q5) and a 1 s raft connect timeout (Q7) are 
both needed for the 12 s bound.
   4. **No old PD binary after enable.** An old binary skips every TXN entry. 
After the flag is on, a Server that finds an old PD fails closed with 503 
instead of falling back to legacy mode. Downgrading PD goes through a disable 
runbook.
   5. **Correction to the master bug list.** The cache "generation" belongs to 
this PR branch; master has the same race without any generation.
   6. **Correction to the Store item.** On a default install the Server's 
`cluster` option is `hg-test` (`ServerOptions.java:192`), while Store's 
`SchemaDriver` hardcodes `hg` (`SchemaDriver.java:67`). I have not yet checked 
on a live cluster what Store then sees. A Store fix (cluster name option, a 
parse that accepts both event formats, then a record watch) is proposed as a 
separate PR.
   7. **Staging.** Stages D and E land together; D is never released without E, 
so there is no interim polling. Stage E removes only the schema-clear event and 
the vertex and edge cache events, which no other Server consumes. Graph and 
graphspace events stay.
   
   Next I start stage A on this branch.
   


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