|
|
|
|
|
by jdf
4119 days ago
|
|
MVCC doesn't necessarily mean no in-place updates, it just means that you can distinguish between multiple versions. For example, Oracle: - keep most recent version of all keys in B-tree - store updates in undo log ("rollback segments") - queries for older versions dynamically undo recent changes http://docs.oracle.com/cd/B19306_01/server.102/b14220/consis... |
|
If you overwrite data in place that's being concurrently read, you get garbled data. So you must guarantee nobody is reading it. One way is to lock the data for both readers and writers using a mutex of some form. Another way is Linux-RCU style[1]. Both make readers always pay a price for what should be an uncommon case.
It makes more sense to me to put your updates in a new place, and if need be copy them over the old data once nobody can see the old data anymore.
[1] http://lwn.net/Articles/262464/