Hi Igniters,

You know, we're currently developing fair MVCC for transactional caches (
https://issues-test.apache.org/jira/plugins/servlet/mobile#issue/IGNITE-4191
).

At now we're trying to make work IgniteDataStreamer with MVCC.

The problem is that MVCC requires linking between versions for checking
rows with visibility rules (see
https://cwiki.apache.org/confluence/display/IGNITE/Distributed+MVCC+And+Transactional+SQL+Design
for details). We cannot do that without write lock on a data row (there are
no guarantees the linking is consistent otherwise). But locks will affect
data streamer performance dramatically.

So, there are two ways, fast one and right one:

1) we introduce a special version which is lower than any other. All
streamed rows are written with this version. All other versions of row are
cleaned up. All pending transactions that involves these rows are marked as
rollback only. Repeatable read simanthyc is broken for reads (since initial
version is always visible, readers see data streamer dirty writes). User
has to ensure there is no other read/write operations while loading.

2) Data Streamer uses it's own mvcc version. All data streamer operations
become transactional. Data streamer acquires table lock before streaming
(write lock). Readers are not affected and see consistent snapshot while
data is loading.

Initially we're going to implement first approach (fast one) and as soon
table locks are introduced (there is an appropriate IEP) we'll do things
right.

What do you think?

Reply via email to