[SERVER-37942] Add failure message to the invariant in setTimestampReadSource Created: 06/Nov/18  Updated: 27/Oct/23  Resolved: 29/May/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Xiangyu Yao (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Gone away Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Storage Execution
Participants:
Linked BF Score: 52

 Description   

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);



 Comments   
Comment by Xiangyu Yao (Inactive) [ 29/May/19 ]

I think it's no longer needed. code

Comment by Dianna Hohensee (Inactive) [ 29/May/19 ]

xiangyu.yao, could you check whether there's still any useful logging to add? The code has changed since this was filed.

Generated at Thu Feb 08 04:47:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.