1
General Discussion about just::thread / Re: MVCC
« on: March 05, 2014, 07:42:12 PM »
MVCC at the simplest form should work as follows:
1) All threads/accessors should be able to read the map concurrently at any given time with seperate isolation levels (read_committed, dirty_read etc)
2) Nodes do not ever get physically deleted unless it is done by a cleanup operation.
3) When a node is modified, technically the code simply inserts a new node with a timestamp. the timestamp is what tells which node is an older version of another node (i.e. technically deleted).
4) When an accessor is trying to read while another operation is inserting a newer version on an existing node, depending on the isolation level the older version gets read if the isolation level is dirty else the accessor should block until the write operation completes i.e. if the reader is using a read_committed isolation level.
I am open to discussing offline to help me achieve this using the concurrent map in the just::thread library.
1) All threads/accessors should be able to read the map concurrently at any given time with seperate isolation levels (read_committed, dirty_read etc)
2) Nodes do not ever get physically deleted unless it is done by a cleanup operation.
3) When a node is modified, technically the code simply inserts a new node with a timestamp. the timestamp is what tells which node is an older version of another node (i.e. technically deleted).
4) When an accessor is trying to read while another operation is inserting a newer version on an existing node, depending on the isolation level the older version gets read if the isolation level is dirty else the accessor should block until the write operation completes i.e. if the reader is using a read_committed isolation level.
I am open to discussing offline to help me achieve this using the concurrent map in the just::thread library.