Closed BEWINDOWEB closed 1 year ago
@andsel 🙏🙏
Hi @BEWINDOWEB this change come into play with PR #365 and honestly I don't recall what was the exact reason for the code.
Originally the code was simpler:
if (cnode.containsOnly(clientId)) {
TNode tnode = new TNode();
return inode.compareAndSet(cnode, tnode) ? Action.OK : Action.REPEAT;
} else if (cnode.contains(clientId)) {
CNode updatedCnode = cnode.copy();
that stated as "if a cnode contains only the clientId we I'm removing then replace it with a tombstone".
ok, thanks anyway :)
confused about
version: 0.16
->CTrie
->remove
method, which goes:inode == this.root
? topic can't be empty at the beginninginode == this.root
, then do the meaningless CASinode.compareAndSet(cnode, inode.mainNode().copy())
?please help on this, thanks :)