Skip to content

feat(data): improve concurrency safety and resource management#5

Merged
aide-cloud merged 3 commits intomainfrom
feature/dev
Dec 17, 2025
Merged

feat(data): improve concurrency safety and resource management#5
aide-cloud merged 3 commits intomainfrom
feature/dev

Conversation

@aide-cloud
Copy link
Contributor

  • 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
@aide-cloud aide-cloud merged commit aaefbe6 into main Dec 17, 2025
1 check passed
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.

1 participant