possible concurrency issues in id-based lastError code

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.3.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • 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 Horowitz (Inactive)
            Reporter:
            Aaron Staple (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: