Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] range scan in multi-threads environment #7

Open
SeKwonLee opened this issue Mar 15, 2019 · 0 comments
Open

[BUG] range scan in multi-threads environment #7

SeKwonLee opened this issue Mar 15, 2019 · 0 comments

Comments

@SeKwonLee
Copy link

SeKwonLee commented Mar 15, 2019

Problem)

Current implementation of range scan can read duplicated keys repeatedly in multi-threads environment and can return value buffer, unsorted by keys. The node scan mechanism of FAST_FAIR proposed in FAST'18 paper changes node scan direction only when insertion and deletion operations are switched each other during scanning. It is understood that this mechanism can correctly address exact matching query, but not for range scan. Please refer to below example.

Example)

"v" is scanner's pointer

                              Insertion 5, 6
Switch counter = 2            Switch counter = 2                Switch counter = 2
Scan buffer (10)              Scan buffer (10, 6)               Scan buffer (10, 6, 10)
  v                             v                                    v
(10, 20, 30, 40, 50) -----> (5, 6, 10, 20, 30, 40, 50) -----> (5, 6, 10, 20, 30, 40, 50)

Solution)

In current implementation, switch counter is only changed with odd or even number depending on whether insertion and deletion operations are switched or not. Our proposed solution is to constantly increase switch counter whenever insertion and deletion operations perform. If applying this solution, range scanner thread can realize that concurrent insertion or deletion is working in the same node, and then restart scanning with rolling back the increased buffer's index number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant