Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-11517

o.a.c.utils.UUIDGen could handle contention better

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 3.8
    • Legacy/Core
    • None

    Description

      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 information.

      Either way it's seems pretty straightforward to rewrite this to use a CAS loop and test that it generally produces unique values.

      Attachments

        Activity

          People

            aweisberg Ariel Weisberg
            aweisberg Ariel Weisberg
            Ariel Weisberg
            Joel Knighton
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: