Skip to content

Nhse o32 orkv.i50 emptymerge#3

Open
martinsumner wants to merge 4 commits intoopenriak-3.4from
nhse-o32-orkv.i50-emptymerge
Open

Nhse o32 orkv.i50 emptymerge#3
martinsumner wants to merge 4 commits intoopenriak-3.4from
nhse-o32-orkv.i50-emptymerge

Conversation

@martinsumner
Copy link
Contributor

Optimises the merging of a set for the case when the Right-Hand Set is empty.

When updating a set, there is always first a merge with an empty set, followed by an update to add a member or members. So optimising a merge with an empty set will improve performance.

OpenRiak/riak_kv#50 (comment)

All CRDT updates at the coordinator include a merge with and empty CRDT before the update is applied.

So the merge function should be optimised to avoid extra work should the RHS CRDT be empty.
Dialyzer complained, but it was important that the variables were matched (though ignored).
@martinsumner martinsumner moved this from Todo to Ready For Review in OpenRiak 3.4.1 Jan 14, 2026
@martinsumner martinsumner self-assigned this Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

1 participant