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

journal: several timestamp cleanups and improvements #32592

Merged
merged 5 commits into from May 2, 2024

Conversation

yuwata
Copy link
Member

@yuwata yuwata commented Apr 30, 2024

Closes #32492.

@yuwata yuwata added the journal label Apr 30, 2024
@github-actions github-actions bot added util-lib please-review PR is ready for (re-)review by a maintainer labels Apr 30, 2024
Copy link

Important

An -rc1 tag has been created and a release is being prepared, so please note that PRs introducing new features and APIs will be held back until the new version has been released.

src/shared/logs-show.c Show resolved Hide resolved
@bluca bluca added good-to-merge/with-minor-suggestions and removed please-review PR is ready for (re-)review by a maintainer labels May 1, 2024
@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed good-to-merge/with-minor-suggestions labels May 1, 2024
src/journal/journald-audit.c Outdated Show resolved Hide resolved
src/shared/logs-show.c Outdated Show resolved Hide resolved
src/shared/logs-show.c Outdated Show resolved Hide resolved
@YHNdnzj YHNdnzj added good-to-merge/with-minor-suggestions and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels May 1, 2024
@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed good-to-merge/with-minor-suggestions labels May 1, 2024
src/shared/logs-show.c Outdated Show resolved Hide resolved
src/shared/logs-show.c Outdated Show resolved Hide resolved
yuwata added 5 commits May 2, 2024 06:34
…tch_message()

No functional change, just refactoring.
No functional change, just refactoring.
Previously, ret_boot_id was assigned even when the function failed due
to an invalid monotonic timestamp stored for a journal entry.
No functional change, just refactoring and preparation for later
commits.
Previously, _SOURCE_REALTIME_TIMESTAMP was only used for realtime
timestamp, and _SOURCE_MONOTONIC_TIMESTAMP was for monotonic.

This make these journal field used more aggressively. If we need
realtime timestamp, but an entry has only _SOURCE_MONOTONIC_TIMESTAMP,
then now realtime timestamp is calculated based on
_SOURCE_MONOTONIC_TIMESTAMP and the header dual timestamp.
Similary, monotonic timestamp is obtained from
_SOURCE_REALTIME_TIMESTAMP and the header dual timestamp.

This should change shown timestamps not so much in most cases, but may
be improve the situation such as systemd#32492.
@bluca bluca merged commit afb1c42 into systemd:main May 2, 2024
43 of 49 checks passed
@github-actions github-actions bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label May 2, 2024
@yuwata yuwata deleted the journal-timestamp branch May 2, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Journalctl shows wrong timestamp on some hibernation-related log messages after waking from hibernation
3 participants