Add failure message to the invariant in setTimestampReadSource

XMLWordPrintableJSON

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

      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:
            [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            Xiangyu Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: