Unable to exit from hasNext() for tailable cursor if cursor was closed from another thread

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.6.0
    • Affects Version/s: 3.5.0
    • Component/s: Query Operations
    • None
    • Environment:
      WIndows 10, Java 1.8
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      Unable to exit from hasNext() for tailable cursor if cursor was closed from another thread
      My proposal is to add another check for "closed" inside

              while (serverCursor != null) {
                  getMore();
                  if (nextBatch != null) {
                      return true;
                  }
              }
      

      before getMore(). So if cursor was closed from another thread, hasNext() will exit. But this should be done in thread-safe way.

              Assignee:
              Jeffrey Yemin
              Reporter:
              Igor
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: