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

Add failure message to the invariant in setTimestampReadSource

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
    • Storage Execution
    • 52

      We should add a message to this invariant so that we can know what the original readSource is and what we set to. It is useful for debugging this invariant failure.
      Change

      invariant(!_active || _timestampReadSource == ReadSource::kUnset || _timestampReadSource == readSource);
      

      to

      invariant(!_active || _timestampReadSource == ReadSource::kUnset || _timestampReadSource == readSource, str::stream() << "Timestamp readSource is " << _timestampReadSource << " but trying to set it to " << readSource);
      

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: