-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
### Rationale for this change Adding RWMutex to protect `loc` in `TimestampType` and fix the race condition. ### Are these changes tested? Yes, a unit test is added which is covered by the CI which runs with `-race`. ### Are there any user-facing changes? Copying `TimestampType` will now be problematic and linters will show it as an error. In theory this shouldn't be a problem as most uses of TimestampType should be utilizing pointers to it rather than the value directly. * Closes: #38795 Lead-authored-by: Matt Topol <[email protected]> Co-authored-by: Benjamin Kietzman <[email protected]> Co-authored-by: Ben Harkins <[email protected]> Signed-off-by: Benjamin Kietzman <[email protected]>
- Loading branch information
1 parent
b1f1ef4
commit 62e1e9a
Showing
3 changed files
with
66 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters