feat(data): improve concurrency safety and resource management#5
Merged
aide-cloud merged 3 commits intomainfrom Dec 17, 2025
Merged
feat(data): improve concurrency safety and resource management#5aide-cloud merged 3 commits intomainfrom
aide-cloud merged 3 commits intomainfrom
Conversation
Contributor
aide-cloud
commented
Dec 17, 2025
- Replace map with SyncMap for concurrent access in closes field
- Ensure proper closure of resources using Set method
- Fix closure variable capture issue in loop
- Add stopOnce and clustersMu for message repository synchronization
- Shuffle cluster indices instead of modifying original slice
- Handle closed message channel in AppendMessage
- Lock when updating clusters slice in initClusters
- Update `.env.example` to change `MOON_RABBIT_JOB_NETWORK` default value from `grpc` to `tcp` - Remove deprecated `MOON_RABBIT_CLUSTER_PROTOCOL` environment variable - Expose port 9091 in Dockerfile for job server - Update README files to reflect job network configuration changes - Modify config parsing to remove protocol option and hardcode grpc - Refactor message repository to remove protocol switching logic - Simplify cluster sender implementation to only support grpc - Update proto definitions to match simplified job service API - Adjust related function calls and error messages accordingly
- Add `cluster-endpoints`, `cluster-name`, and `cluster-timeout` flags to run command - Support setting cluster namespace in client config - Move cluster initialization logic into message repository with once guard - Update email sender to use bootstrap namespace for discovery - Adjust error handling in email sending to continue on failure instead of returning fix(send): ensure global flags are initialized before use - Initialize global flags in send command if nil to prevent panic refactor(config): extend ClientConfig with namespace field - Add optional namespace field to ClientConfig protobuf message
- Replace map with SyncMap for concurrent access in closes field - Ensure proper closure of resources using Set method - Fix closure variable capture issue in loop - Add stopOnce and clustersMu for message repository synchronization - Shuffle cluster indices instead of modifying original slice - Handle closed message channel in AppendMessage - Lock when updating clusters slice in initClusters
d417c28 to
96c2ca2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.