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

improve handling of empty vs nonexistent CollectionMetadata

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.7.2
    • None
    • Sharding
    • None
    • ALL
    • 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

        Activity

          People

            randolph@mongodb.com Randolph Tan
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: