-
Notifications
You must be signed in to change notification settings - Fork 1
G3: writes and transactions #118
Copy link
Copy link
Closed
Labels
gqlISO/IEC 39075 GQL conformanceISO/IEC 39075 GQL conformancemilestoneMilestone tracking issueMilestone tracking issueperfPerformance and resource budgetsPerformance and resource budgetsqueryParser, planner, executorParser, planner, executorstorageStorage engines and file formatsStorage engines and file formats
Description
Activity
Metadata
Metadata
Assignees
Labels
gqlISO/IEC 39075 GQL conformanceISO/IEC 39075 GQL conformancemilestoneMilestone tracking issueMilestone tracking issueperfPerformance and resource budgetsPerformance and resource budgetsqueryParser, planner, executorParser, planner, executorstorageStorage engines and file formatsStorage engines and file formats
Milestone G3 of the GQL program (Spec/2064g/gql/plan/00-overview.md). Specs: plan/03 §7, plan/06 §4.
Blocked by P5 (#78). Blocked by G2 (#117), because writes need labels and edge properties to write.
The parser rejects CREATE, SET, DELETE, DETACH and MERGE by name, so zu is read only as far as GQL is concerned, and three whole graph-bench families produce no zu numbers at all: snb-update, linkbench and fb-write. The machinery underneath is not the problem, M3 delivered WAL, single writer commit, overlays, checkpoint, recovery and a crash injection harness, and the recovery matrix is checked in. This milestone is the statement surface over machinery that is already crash tested, plus the one genuinely new thing, which is a transaction local catalog overlay.
writes (plan/03 §7):
INSERTin both subquery and simple expression formsINSERTcreates, with the endpoint check against the tables the edge type declaresMATCHfollowed byINSERT, so the write runs once for every row the clauses before it answeredSETandREMOVEfor properties and for labelsSETof a property of a node, run once per row, with the clauses after it reading what it wroteSETof a property of an edge, which is addressed by the order its table holds its edgesSETof a whole record, which empties every property the record does not nameREMOVEof a property, which the binder turns into a null and the fold records in a validity maskSETandREMOVEof a label the row's table already declares, which puts the bit on and takes it off the row's label word so a pattern naming it finds the row afterwardsSETof a label the table has not declared, which the statement declares itself, publishing the widened catalog before it stages the bit and taking the declaration back with the rows when it raisesDELETEandDETACH DELETEDELETEof a node with no edges on it, which stages a tombstone the fold merges into the table's chain and every read filters byDELETEof a node that still has edges raises G1001 rather than leaving an edge pointing at nothingDETACH DELETE, which takes the edges on an element with it through a log record that names a removed edge by the rows it runs between and a fold that drops that pair out of the CSR it rebuildsDELETEof an edge the statement named itself, which is the one delete that never has to refuse, andNODETACH DELETE, which is the default said out loudtransactions (plan/06 §4):
START TRANSACTION,COMMIT,ROLLBACKas explicit statementsREAD ONLYandREAD WRITEREAD ONLYenforced before any work happens, so the planner can skip write path setupstatus codes:
done when:
transactionscapability skips are gone