fix(deps): update module github.com/go-crdt/crdt to v0.36.0 - #15
Merged
Conversation
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.
This PR contains the following updates:
v0.35.0→v0.36.0Release Notes
go-crdt/crdt (github.com/go-crdt/crdt)
v0.36.0Compare Source
Map.Collectasked for a version every replica had delivered. That is notwhat a tombstone needs, and two replicas that had applied the same operations
ended up holding different documents.
What was wrong
A version says which operations everybody holds. It says nothing about the
clocks of the operations still in flight — a site that has seen nothing writes
at clock one, however far along everyone else is.
So: site 3 writes
k, site 2 deletesk, neither having seen the other. Bothare at clock 1 and the tie goes to the higher site, so the write beats the
deletion. The deletion reaches everybody, which makes it collectable by the rule
as stated. The write is still on its way.
write wins, and the key comes back.
the write, and the key stays gone.
Same operations. Different documents. This is the shape of the fault that
withdrew the text and list collection in v0.35.0, in the one collection that was
kept.
Breaking
Map.Collect,Composite.Collectandstructured.Diagram.Collecttake aclock floor as well: a promise that no operation with a clock at or under it
can still arrive. A tombstone goes when its own clock is at or under that floor
— everything still to come is then strictly later, and a write strictly later
beats it, brings the key back, and wants no comparison. What needed the
tombstone was a write at or below its clock.
A replica cannot work the floor out alone: it does not know who is out
there, and the site whose write is on its way is exactly the one it has never
heard from.
Map.LastClocks,Map.ClockandComposite.Clocksare what itoffers whoever can promise one.
CompositeClockscarries one floor per part,because each map has a clock of its own.
go-crdt/collabv0.34.0 computes such a floor: participants acknowledge theirclocks as well as their version.
Also
Composite.Applyreports what a map part refuses instead of dropping it.The comment said a part's
Applycould not fail once the batch had validated;that stopped being true when
Map.CollectintroducedErrStranded, which isabout the state of this replica rather than the batch. Dropping it meant the
operation was refused, the caller was told the batch had been applied, and
everything that site sent afterwards waited for a predecessor that never
arrived — 63 thrown away in one chaos run, one replica left holding 1 555
operations back for good.
The clock a map remembers collecting under is the floor it was asked with,
not the highest it happened to drop. What a replica drops depends on what it
was holding, so remembering that put replica-relative state in a snapshot that
promises to be canonical: two replicas with the same 782 keys, the same 160
tombstones, and different bytes.
The structured chaos collects, which is how all of this was found — every
replica reaches its composite, the floor is the meet over all of them, and
they all collect with the same version so their bytes stay comparable. Twenty
seeds, eighty-six collections, seventeen thousand records given back, every
type still agreeing at the end.
The floors are fuzzed and have a lane of their own.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.