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

Don't cut off milliseconds from current-time-in-milliseconds #306

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

Al2Klimov
Copy link
Member

The more precisely we write our timestamps, the less race conditions happen to the Go daemon's incremental config update mechanism if two users change something during the same second.

php > var_dump((int) (new DateTime())->format("Uv"));
int(1741607923054)
php > var_dump(time() * 1000);
int(1741607928000)
php >

The more precisely we write our timestamps, the less race conditions happen to the Go daemon's incremental config update mechanism if two users change something during the same second.

php > var_dump((int) (new DateTime())->format("Uv"));
int(1741607923054)
php > var_dump(time() * 1000);
int(1741607928000)
php >
@Al2Klimov Al2Klimov requested a review from oxzi March 10, 2025 12:30
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Mar 10, 2025
Copy link
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

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

@sukhwinder33445: We talked about this on July 11 and I am generally in favor of this PR. However, I cannot estimate the impact of this change.

Copy link
Contributor

@sukhwinder33445 sukhwinder33445 left a comment

Choose a reason for hiding this comment

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

Works fine and has no negative impact.

@Al2Klimov Al2Klimov merged commit 9c518a8 into main Mar 21, 2025
22 checks passed
@Al2Klimov Al2Klimov deleted the milliseconds branch March 21, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants