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

Initialise number of log lines seen to support refresh #1784

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

lionel-
Copy link
Contributor

@lionel- lionel- commented Nov 5, 2023

Follow-up to #708 which adds a mechanism to flush the tail of the log on restart. I noticed some missing log lines in case of refresh. This PR fixes this by initialising the number of lines seen from the existing file.

There is a race condition here since the kernel is concurrently writing to the log file. If this happens there will be duplicate lines in the tail of the log when the runtime restarts, but no missing lines.

In addition:

  • Rewrite implementation to use a synchronous file access API instead of asynchronous.
  • Keep track of error lines seen.

@lionel- lionel- requested a review from jmcphers November 5, 2023 10:02
@lionel- lionel- merged commit f3a41de into main Nov 6, 2023
1 check passed
@lionel- lionel- deleted the bugfix/log-tail-on-restart branch November 6, 2023 17:59
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