Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-535

possible concurrency issues in id-based lastError code

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.1
    • Affects Version/s: None
    • Component/s: None
    • None

      I don't know much about how message-id based lastErrors are to be used, but it seems like there could be some concurrency issues:

      For example, lastError.startRequest() is called in connThread() without any mutex, and it in turn calls lastError.get() which reads and modifies the lastError._ids map without a mutex. Since there's only one global lastError object shared by all threads this could be a problem. In addition, only the top two bytes of the message id are used to map a LastError object. Conceivably a single LastError object could be used by two threads, though depending on usage perhaps this is prevented in practice?

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: