Skip to content
Snippets Groups Projects
Commit a1e005d8 authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy Committed by Konstantin Osipov
Browse files

vinyl: write_iterator merges vlsns subsequnces

Now write iterator see only oldest vlsn. Because of it
the write iterator can not skip or merge or squash
newer statements, even if they are not used by any
transactions. For example, consider one key and its lsns:

      LSNs:  10   20   30   40   50
Read Views:  *         *         *

Statements with lsn 40 can be merged with 50;
20 can be merged with 30.
Old write iterator will merge nothing in that case,
because there is oldest vlsn = 10.

Lets allow the write iterator to see all read views, instead
of only oldest.
Such write iterator can merge multiple lsns subsequences
of each key.
For the example above it will merge in the following way:

      LSNs:   10   20   30   40   50
Read Views:   *         *         *
  Merge and  \__/\_________/\________/
    return:    merge,   merge,   merge
             and return each merged result.

For the considered case the difference is 3 result statements
instead of 5 by the old write iterator.

Closes #1920
Closes #2502
Closes #1824
Closes #2578
parent de11d68a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment