-
Notifications
You must be signed in to change notification settings - Fork 1
fix: ensure shm writers are cleared at shutdown #57
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
Conversation
fix: clean up gsw_service and db logging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the shutdown behavior of the GSW service to ensure proper cleanup of shared memory (SHM) writers. It introduces context-based cancellation to the decom subsystem and expands the logger API to expose the underlying zap logger for improved structured logging.
Key changes:
- Added context cancellation support to
TelemetryPacketWriterto enable graceful shutdown - Exposed the underlying zap logger through a new
Log()function in the logger API - Improved structured logging throughout decom and database writer components
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| proc/decom.go | Refactored TelemetryPacketWriter to accept context, return errors, and use structured logging with proper UDP connection cleanup |
| lib/logger/logger.go | Added Log() function to expose the underlying zap logger for creating scoped loggers |
| cmd/gsw_service.go | Updated to use context-aware decom initialization, wait for channel closure on shutdown, and made database configuration optional |
| proc/db_write.go | Enhanced logging with scoped logger and structured fields for the database writer |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
closes #55 and makes progress on #56
Description
gsw_service.gsw_serviceand the influx writer.Tested by stopping
gsw_serviceand ensuring no SHM descriptors are left.