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

Remove moveChunk from sharding/cursor_timeout.js and fix test

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Sharding
    • Fully Compatible
    • 0

      Executing a migration in cursor_timeout.js appears to have no purpose. There isn't even an assert that the migration succeeded. ensurePrimaryShard (already done in the test) is sufficient to assure that the data is on a specific shard.

      The moveChunk operation in fact fails every time with a ChunkTooBig error. And then the mongod connected cursor is created against the moveChunk's source shard. So if the moveChunk does succeed, the test actually fails because the cursor is opened against a shard that does not have that collection and thus .next() on that cursor fails.

      Instead of inserting 200 documents, the test should insert far fewer and include a batchSize setting on the find commands to ensure that the cursor remains open. There is then also no reason to insert huge documents: documents with a string field with length 2^17. Perhaps the huge documents were because there was or is a data size limit on cursor returns, but batchSize should take care of it.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: