Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timestamp usage with random label. #4830

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

KiterLuc
Copy link
Contributor

@KiterLuc KiterLuc commented Mar 25, 2024

Random label uses the current time to know if a new label needs to use an incrementing counter so that labels generated in the same millisecond sort properly when reading back. Since the code at the higher level used a timestamp and the random label used another, it was possible to end up with timestamped names having the same millisecond, but not sorting properly. The fix is to have the random label code return the timestamp it used to the caller so that the caller can use it to generate timestamped names.


TYPE: NO_HISTORY
DESC: Fix timestamp usage with random label.

Copy link

This pull request has been linked to Shortcut Story #43629: CI failures on dev merge.

@KiterLuc KiterLuc marked this pull request as draft March 25, 2024 22:41
@KiterLuc KiterLuc force-pushed the lr/random-label-timestamp-fix/ch43629 branch 2 times, most recently from feef469 to 31f3477 Compare March 26, 2024 01:09
@KiterLuc KiterLuc changed the title Draft: Fix timestamps in random label. Fix timestamp usage with random label. Mar 26, 2024
@KiterLuc KiterLuc marked this pull request as ready for review March 26, 2024 10:19
Random label uses the current time to know if a new label needs to use an incrementing counter so that labels generated in the same millisecond sort properly when reading back. Since the code at the higher level used a timestamp and the random label used another, it was possible to end up with timestamped names having the same millisecond, but not sorting properly. The fix is to have the random label code return the timestamp it used to the caller so that the caller can use it to generate timestamped names.

---
TYPE: NO_HISTORY
DESC: Fix timestamp usage with random label.
@KiterLuc KiterLuc force-pushed the lr/random-label-timestamp-fix/ch43629 branch from 31f3477 to 8edff94 Compare March 26, 2024 10:23
@KiterLuc KiterLuc requested a review from bekadavis9 March 26, 2024 10:24
@ihnorton ihnorton requested a review from davisp March 26, 2024 11:49
Copy link
Contributor

@bekadavis9 bekadavis9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KiterLuc KiterLuc merged commit 04ba137 into dev Mar 26, 2024
58 checks passed
@KiterLuc KiterLuc deleted the lr/random-label-timestamp-fix/ch43629 branch March 26, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants