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

Refactor: move devnull from global variable to the stack

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.5.0
    • memcached

    Description

      in drain_notification_channel ( http://src.couchbase.org/source/xref/trunk/kv_engine/daemon/thread.cc#249 ) we use a global variable devnull which is a blackhole (we just want to discard the data). This cause thread sanitizer to warn about a race (as we write to it from multiple threads without locking), so we've got a suppression rule in place http://src.couchbase.org/source/xref/trunk/tlm/tsan.suppressions#54 .

       

      We can just refactor the code to keep the variable on the stack (probably smaller to avoid blowing the stack) and remove the suppression.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            eugen.virtan Eugen Virtan (Inactive)
            trond Trond Norbye
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty