cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ariel Weisberg (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11517) o.a.c.utils.UUIDGen could handle contention better
Date Thu, 07 Apr 2016 15:09:25 GMT


Ariel Weisberg commented on CASSANDRA-11517:

I wasn't running with assertions enabled :-( I don't really like that we use java assertions
instead of junit assertions.

Pushed an updated version that fixes the bugs you mentioned and does the rename. It also uses
atomic increment instead of CAS for sub-millisecond updates.

I can't really argue with it being trunk only. It's a minor improvement, but it's also a minor
change. It really depends on what the threshold is.

> o.a.c.utils.UUIDGen could handle contention better
> --------------------------------------------------
>                 Key: CASSANDRA-11517
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Ariel Weisberg
>            Assignee: Ariel Weisberg
>            Priority: Minor
>             Fix For: 3.0.x, 3.x
> I noticed this profiling a query handler implementation that uses UUIDGen to get handles
to track queries for logging purposes.
> Under contention threads are being unscheduled instead of spinning until the lock is
available. I would have expected intrinsic locks to be able to adapt to this based on profiling
> Either way it's seems pretty straightforward to rewrite this to use a CAS loop and test
that it generally produces unique values.

This message was sent by Atlassian JIRA

View raw message