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

About R/W lock #9

Open
heejin5178 opened this issue Apr 19, 2021 · 2 comments
Open

About R/W lock #9

heejin5178 opened this issue Apr 19, 2021 · 2 comments

Comments

@heejin5178
Copy link

I have a question about the locking scheme of CCEH. I read the "CCEH_MSB.cpp" code and found exclusive lock is the same as the shared lock. Each line is 193 and 392. Followed by the research paper, you used R/W lock. However, it seems that the lock that you used in "Insert" is shared, not exclusive. As far as I understand, "suspend" is worked as an exclusive lock. I wonder whether I misunderstood your code or not. Thank you.

@chahk0129
Copy link
Contributor

Thanks for your interest in our project. You’re correct about the locking scheme. The current implementation of CCEH uses a shared lock for optimization and handles write-write conflicts with an additional CAS of the most significant 8 bytes in the target key to a SENTINEL value. In case of a segment split, it holds an exclusive lock and waits until all the ongoing readers and writers finish.

@heejin5178
Copy link
Author

First of all, I really appreciated your fast reply. And I want to ask about R-W consistency. Followed by paper, when you use lazy deletion, CCEH can guarantee strong consistency. However, if a shared lock is used for normal insert(not split, doubling), how can CCEH guarantee consistency between read and write under concurrent mixed workload?

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

2 participants