Resharding should validate user provided zone range doesn't include $-prefixed fields.

XMLWordPrintableJSON

    • Cluster Scalability
    • Fully Compatible
    • v7.0, v6.0, v5.0
    • Cluster Scalability 2024-3-4, Cluster Scalability 2024-3-18
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Resharding currently doesn't validate that the user provided zone range doesn't include $ prefixed fields. This could lead to the reshardCollection command beginning but failing to persist chunk metadata with the error:

      _id fields may not contain '$'-prefixed fields: $maxKey is not valid for storage. 

      We should probably do something similar to what updateZoneKeyRange does and call ShardKeyPattern::checkShardKeyIsValidForMetadataStorage().

              Assignee:
              Erin Liang
              Reporter:
              Kshitij Gupta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: