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

mongos autosplitting does not persist or calculate chunksize correctly

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 1.7.4
    • Sharding
    • None
    • ALL

    Description

      There are several problems with the current strategy for chunk splitting. chunk splitting is (as of 1.7.4) based solely on the amount of new data written to an existing chunk through a single mongos and only since that mongos was started. This is problematic when mongos is restarted or when multiple mongos instances are run because chunks do not get split as expected.

      • _dataWritten (or really currentChunkSize as it's used) should be persisted to the config db and coordinated across multiple mongos instances
      • _dataWritten in the config db should be initialized from getPhysicalSize() when no value is present in the config db. it should never be initialized to a random value that does not represent actual size (https://github.com/mongodb/mongo/blob/r1.7.4/s/chunk.cpp#L58)
      • _dataWritten should not be re-set to 0, but should be set appropriately for each post-split chunk https://github.com/mongodb/mongo/blob/r1.7.4/s/chunk.cpp#L327 (if it is zero'd out and the chunk is not split, it currently requires an additional (maxChunkSize / 2) of data to be written through that specific mongos before it will again be considered for a split.
      • post-split (in Chunk::multiSplit) each chunk should have it's _dataWritten initialized to getPhysicalSize()
      • _dataWritten is not updated on commands that use the multi=True flag

      Attachments

        Activity

          People

            Unassigned Unassigned
            jehiah Jehiah Czebotar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: