feat: Introduce dataserver and coordinator configuration (part.3)#860
feat: Introduce dataserver and coordinator configuration (part.3)#860mattisonchao merged 7 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a configuration watch mechanism for the dataserver and coordinator, enabling dynamic updates to configuration options (specifically log levels) without requiring a server restart.
Changes:
- Added a generic
Watch[T]type for observing configuration changes with version tracking - Integrated background goroutines in both dataserver and coordinator to monitor and apply configuration changes
- Updated server constructors to accept watchable options and parent contexts for lifecycle management
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| oxiad/common/option/watch.go | New generic watch primitive for observing value changes with version tracking |
| oxiad/common/option/watch_test.go | Comprehensive test suite for the Watch implementation |
| oxiad/dataserver/server.go | Added background configuration watcher with context management for dataserver |
| oxiad/coordinator/server.go | Added background configuration watcher with context management for coordinator |
| oxiad/common/logging/logger.go | Added ReconfigureLogger function for dynamic log level updates |
| cmd/server/cmd.go | Integrated viper file watcher and watchable options for dataserver |
| cmd/coordinator/cmd.go | Integrated viper file watcher and watchable options for coordinator |
| common/codec/options.go | Added empty WatchFileOptions function (unused) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 14 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 17 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Motivation
This PR is part.3 of the configuration introduction. which includes the dynamic configuration watch and implements the dynamic log level updates.
Modification