gridfs has a data race (found by go test -race)

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: 2.5.0
    • Component/s: GridFS
    • None
    • None
    • Go Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      When running the test suite for https://github.com/chirino/memory-service

      I ran into the following data race in the mongo driver.  I've now put in a mutex around calls to the mongo driver, which is not ideal.  See the attached datarace.log for more details about the race.

      Definition of done

      You should run your unit test/integration tests with go test -race

      that may allow you to reproduce this.

      Pitfalls

      What should the implementer watch out for? What are the risks?

            Assignee:
            Qingyang Hu
            Reporter:
            Hiram Chirino
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: