mongoc_cursor_set_batch_size does nothing if batch size is was set as int32

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 1.24.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      A batchSize may be set on a mongoc_cursor_t in two ways.

      mongoc_collection_find_with_opts allows setting batchSize through the bson_t opts. It accepts either int32 or int64.

      mongoc_cursor_set_batch_size only overwrites the internally set batchSize if it was previously set as an int64.

      I expect that mongoc_cursor_set_batch_size should overwrite the batchSize if it was also previously set as an int32.

      Attached is a proposed regression test.

      How to Reproduce

      A regression test is attached.

      Proposed Scope

      • Have mongoc_cursor_set_batch_size override a batchSize that was set as an int32 option.

            Assignee:
            Adrian Dole
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: