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

HSEARCH-2250 Improve readability and efficiency of MultiWriteDrainabl… #1091

Closed
wants to merge 1 commit into from

Conversation

Sanne
Copy link
Member

@Sanne Sanne commented Apr 28, 2016

@Sanne
Copy link
Member Author

Sanne commented Apr 28, 2016

to simplify the review:
I only replaced the usage of ReentrantLock with synchronized. All we needed was exclusive lock, so synchronized gives us the same semantic and might be optimized better.

The two methods which used the lock in a try/finally block are now broken up, each in two smaller methods. That's to keep the synchonized at the smallest possible level, and in practice at the same level as it was when using the lock.

@gunnarmorling
Copy link
Member

Rebased and applied. Added one more commit for some clean-up. Thanks, @Sanne.

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