Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11256

improve handling of empty vs nonexistent CollectionMetadata

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.2
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      See attached jstest.

      Show
      See attached jstest.

      Description

      When a new collection is added and its data is migrated to another shard (from the primary shard), any mongos which had already authenticated a user to that DB before the collection is sharded and data move happened now cannot see this collection's data on the other shard.

      I think this may be related to mongod setting shard version for that collection to 0 when last chunk is migrated off of it, but that's problematic possibly in similar way we require flushRouterConfig when movePrimary is done for a database.

        Attachments

        1. auth_shard_collection.js
          5 kB
        2. noauth_shard_collection.js
          4 kB
        3. testOutputFailingNoauth.txt
          92 kB
        4. testOutputPassingNoauth.txt
          88 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: