about silo OCC's writeset lock
Closed this issue · 2 comments
chpooo commented
There are serveral question's about silo's OCC writeset lock during commit time.
1, Is the lock always set to true when the tuple is a inserted one?
2, If tuples are modified ones, are there any locks during commit time? Does Silo create a new version in thread-or-numanode local memory and update the index?
stephentu commented
To answer 1), yes, this is an optimization.
To answer 2), there are two cases. Case (a) is if the modification is in the same epoch, in which case the data is overwritten in place. Case (b) is if the modification is in a later epoch, in which case a new tuple is created and the index updated. In both cases locks on the tuple must be acquired.
Hope this helps.
chpooo commented
thanks