DBCursor isn't thread-safe !

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.9.1, 2.9.2, 2.9.3
    • Component/s: API
    • Environment:
      openjdk 7 on linux x64
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The DBCursor object of the java driver api doesn't seem to be thread-safe:

      I execute dbcursorobject.next() within the run() method of a Runnable in order to get back each document of a collection within a separate thread.

      As a result I get some documents duplicate, others are missing and randomly a NullPointerException occurs.

      I guess neither next() nor hasNext() are thread-safe here.
      Since the java-driver claims to be thread-safe that might have to be fixed.

            Assignee:
            Unassigned
            Reporter:
            Mark Henzel
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: