Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-591

ChangeStream option BatchSize is passed to the pipeline stage instead to the cursor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.1.0
    • Affects Version/s: None
    • Component/s: CRUD
    • Labels:

      The BatchSize change stream option is passed into $changestream aggregation pipeline instead to the cursor of the aggregation within Watch().

      When performing:

      	changeStreamOpts := changestreamopt.BundleChangeStream(changestreamopt.BatchSize(1000))
      	cursor, err := collection.Watch(context.Background(), nil, changeStreamOpts)
      

      Resulting in error message:

      2018/10/08 14:53:47 (Location40415) BSON field '$changeStream.batchSize' is an unknown field.
      

      Looking at the code
      https://github.com/mongodb/mongo-go-driver/blob/v0.0.15/mongo/change_stream.go#L66-L73

      only maxAwaitTimeMS is passed to the cursor, but batchSize is passed into the pipeline operator.

       

      This affects current version 0.0.15

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            wan.bachtiar@mongodb.com Wan Bachtiar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: