-
Notifications
You must be signed in to change notification settings - Fork 378
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: Use channel semantics to manage LogStream
lifecycle in Tailer
.
#893
Commits on Jul 5, 2024
-
refactor: LogStreams manage their own staleness expiration.
After each read we reset a timer using `AfterFunc` to cancel the context if the timer expires. This removes the use of the `Stop` call from the Tailer.
Configuration menu - View commit details
-
Copy full SHA for 84c53b5 - Browse repository at this point
Copy the full SHA 84c53b5View commit details -
refactor: Remove
Stop
from theLogStream
interface.We exit with context cancellation now, so don't need a second way to initiate stream shutdown.
Configuration menu - View commit details
-
Copy full SHA for d4b0a50 - Browse repository at this point
Copy the full SHA d4b0a50View commit details -
refactor: Remove
LastReadTime
from theLogStream
interface.This is no longer used in the Tailer.
Configuration menu - View commit details
-
Copy full SHA for 1830e87 - Browse repository at this point
Copy the full SHA 1830e87View commit details -
feat: Remove LogStreams when the lines channels are closed.
This duplicates work with the gc poll but acts immediately when the stream ends. The glob test is updated because now the streams are guaranteed to exit during shutdown and `stopM` was being called too early.
Configuration menu - View commit details
-
Copy full SHA for 7aebf03 - Browse repository at this point
Copy the full SHA 7aebf03View commit details -
refactor: Remove
IsComplete
from theLogStream
interface.Cleanup happens in the tailer when the stream channel closes, so we can remove the GC function to do cleanup. Removing the method means we need a new way to check for completion in test, which we can do by looking at the value coming off the channel.
Configuration menu - View commit details
-
Copy full SHA for f2d8c1c - Browse repository at this point
Copy the full SHA f2d8c1cView commit details -
refactor: Remove the
gcWaker
from the Tailer.This is no longer needed as is handled immediately by the tailer when the stream channel closes. The command line flag is now deprecated.
Configuration menu - View commit details
-
Copy full SHA for 9552a9b - Browse repository at this point
Copy the full SHA 9552a9bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a3aed5 - Browse repository at this point
Copy the full SHA 4a3aed5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3c493e - Browse repository at this point
Copy the full SHA d3c493eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bfe5fec - Browse repository at this point
Copy the full SHA bfe5fecView commit details -
Configuration menu - View commit details
-
Copy full SHA for cf3931d - Browse repository at this point
Copy the full SHA cf3931dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f39cf7b - Browse repository at this point
Copy the full SHA f39cf7bView commit details