Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1877

Change stream user documentation & tests for JRuby

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Docs, JRuby, Tests
    • None

      Currently our documentation states that change streams are not usable in JRuby. As far as I can tell this is because the Enumerable interface, which is what #to_enum produces, in JRuby performs background buffering which ends up reading data ahead of when the application requests it, resulting in unexpected behavior.

      However with try_next it is possible to use change streams in JRuby because this avoids Enumerable entirely.

      In scope for this ticket:

      1. Add documentation to tutorial stating that for JRuby the supported way to use change streams is via ChangeStream#try_next.
      2. Go through change stream tests and add variations of them using try_next as documented.
      3. Mark all change stream tests not using try_next with only_mri.

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: