Clarify ShardingTest.shardColl API

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • 2
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      Reading through the implementation of shardColl(), the resulting behavior of the operation (in terms of where data ends up) is not clear.

      If I provide "collName" and "key", it's unclear to me if I should expect the data to actually be distributed across shard or just reside on the primary shard since I don't provide any split or move logic. This came up in code review with charlie.swanson@mongodb.com when testing SERVER-106933. I did some manual checks to confirm the 3 documents do get split across the 2 shards, but it's not clear to us why. Is it the balancer? Is the helper finding a split point for us?

      We've had a history of bugs on query because we think we're testing a sharded collection but the test doesn't actually distribute documents, or vice versa. It'd be much appreciated if ShardingTest was more intuitive to work with in this case

            Assignee:
            Unassigned
            Reporter:
            Will Buerger
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: