GSet ported to delta-CRDT (#22187)
This commit is contained in:
parent
5ffb08cd78
commit
d470321051
5 changed files with 80 additions and 20 deletions
|
|
@ -79,7 +79,9 @@ public class TwoPhaseSetSerializer extends AbstractSerializationSupport {
|
|||
for (String elem : msg.getRemovalsList()) {
|
||||
removals = removals.add(elem);
|
||||
}
|
||||
return new TwoPhaseSet(adds, removals);
|
||||
// GSet will accumulate deltas when adding elements,
|
||||
// but those are not of interest in the result of the deserialization
|
||||
return new TwoPhaseSet(adds.resetDelta(), removals.resetDelta());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e.getMessage(), e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue