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

Illegal cast to StaleConfigException is possible after moveChunk which fails with StaleConfigException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.4.0-rc1
    • Fix Version/s: 3.4.0-rc3
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Any moveChunk command where the caller has stale version should be able to exercise it.

      Show
      Any moveChunk command where the caller has stale version should be able to exercise it.
    • Sprint:
      Sharding 2016-11-21

      Description

      The moveChunk command on the shard was made rejoinable for the purpose of supporting recovery of active migrations after balancer step down.

      A command which rejoins will take the status from the command which executed the actual move operation and call uassertStatusOK on it.

      However, the SendStaleConfig error code is treated specially and the resulting DBException is later cast to StaleConfigException. In this case, such a typecast will be illegal and may lead to accessing invalid memory.

        Attachments

          Activity

            People

            Assignee:
            misha.tyulenev Misha Tyulenev
            Reporter:
            kaloian.manassiev Kaloian Manassiev
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: