yuvi icon indicating copy to clipboard operation
yuvi copied to clipboard

Use optimistic locking to reduce lock contention in metric store

Open deqinw opened this issue 7 years ago • 2 comments

Replace intrinsic lock and explicit ReentrantReadWriteLock with Java's implementation of optimistic readers-writer lock to improve throughput.

Remove "throws" clause where no exception is thrown. More specific checked exception type should be declared if there will be exception thrown from those functions in the future.

Avoid naming local variables in VarBitTimeSeries.deserialize() with the same name as class variable. This could cause confusion and nasty bugs.

deqinw avatar Oct 27 '17 06:10 deqinw

Thanks for the patch. We are stabilizing the code this week and running some tests. So, I will merge this patch next week. If you can separate the locking change from the rest of the code, I will merge the rest of the changes first.

mansu avatar Oct 31 '17 09:10 mansu

Sure. Sorry I've been busy these days and didn't pay much attention to my Github account. I'll separate the change and submit PR after I come back from my vacation next week, thanks!

deqinw avatar Nov 11 '17 09:11 deqinw