Repository navigation
Conversation
The replay invariant in design/qwp-nack-policy-v2.md said a NACK means the server applied nothing of the rejected batch. The server's commit batch now spans every table of a receive pass and commits the tables one at a time (questdb#8195). It rejects the whole batch for every refusal it can check before committing: a read-only node, an ACL denial, or a dropped, renamed or suspended table. A storage fault on one table's commit, or a DROP, RENAME or SUSPEND WAL landing while the batch commits, can still fail a table after others committed. Their rows from frames at or after the NACKed frame are then applied, and the client's RETRIABLE replay sends them again. The invariant now states what a NACK names, when the replay duplicates nothing, and the exception with its bound: one server receive pass (http.recv.buffer.size, 2 MiB by default). DEDUP tables absorb the duplicates. The client's policy does not change: it replays rather than risk loss.
The invariant packed the ack rule, the pre-commit refusals and the partial-commit exception into one long sentence chain, and it no longer matched the server: questdb#8195 now checks a table's refusals as the table joins the commit batch, and a DROP, RENAME or SUSPEND WAL can fail a table at any time while it waits for its commit, not only mid-commit. The bullet now states the ack rule, what a RETRIABLE replay normally re-sends, when it re-sends rows the server already stored, and what bounds them: one server receive pass for plain frames, or the whole group for a FLAG_DEFER_COMMIT group, which the old text left out.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tandem: questdb/questdb#8195.
The server commits each table on its own, so a table whose commit fails after others committed leaves their rows from the replayed frames already stored. Since questdb/questdb#8195 one commit spans the plain frames of a whole receive pass, which makes this up to one pass (
http.recv.buffer.size, 2 MiB by default); aFLAG_DEFER_COMMITgroup can re-send the whole group. The invariant now states this in place of "NACK ⇒ batch atomically not applied".