Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-31390

AtomicUnorderedMap: shared locking

    XMLWordPrintable

Details

    Description

      The AtomicUnorderedMap could benefit from shared_locking for the management of map membership, for example size/find/empty can use shared_lock whilst erase/insert can use exclusive locking.

      This improvement becomes more useful as the for_each style methods do more work, e.g. the function object which executes under the lock is more expensive. At the moment for_each would execute serially, even if different keys were used, whilst with shared locking they could execute concurrently.

      The objects in the map are assumed to themselves be independently 'thread-safe' (e.g. ActiveStream). The AtomicUnorderedMap mutex is assumed to exist for correct/consistent management of the map itself

      Attachments

        For Gerrit Dashboard: MB-31390
        # Subject Branch Project Status CR V

        Activity

          People

            jwalker Jim Walker
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty