Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-689

DBCursor isn't thread-safe !

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.9.1, 2.9.2, 2.9.3
    • API
    • openjdk 7 on linux x64

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bugdigger Mark Henzel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: