DeletingMutCSet deleted values
mweidner037 opened this issue · 2 comments
After a value is deleted in DeletingMutCSet, it is forgotten and can no longer be used. This can be problem if a value is deleted while concurrently, some other operation serializes it, generating a serialized Collab reference. When a replica receives the delete operation and then receives the serialized message, it is unable to deserialize it.
Currently, we work around this by having DeletingMutCSet's deserializer return a FakeDeletedCollab, which uses a proxy to throw an error on any method call. Is there a better way?
Use case to keep in mind: in a spreadsheet, if a column is deleted concurrently to an operation referencing a cell in that column, then the operation will attempt to deserialize a reference to the column (as part of the cell's key).
Special case: a user might keep a separate reference to a value, then try to perform operations on it after the value is deleted. Currently, this would throw an error; but perhaps we could weakly store such values and let operations succeed locally (while not sending messages to other replicas)?
In the latest implementation, values are perma-deleted and no longer receive remote messages, but they will still work locally if the user happens to keep a reference to them. (There is a special case for this in CSet
's childSend/receive.)