feat: make shared memory directory configurable - #83
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
|
Thanks for the pull request. This thread has been quiet for 30 days, so we are marking it as stale for now. Please take a quick look and let us know whether it is still up to date, still relevant, needs review, or is ready to merge. Any new activity will remove the stale label automatically. If nothing changes in the next 10 days, we will close it to keep the backlog current. |
|
I still think this could be an interesting addition and am looking for feedback |
6fdf3cf to
53640e1
Compare
|
Thanks for the pull request. This thread has been quiet for 30 days, so we are marking it as stale for now. Please take a quick look and let us know whether it is still up to date, still relevant, needs review, or is ready to merge. Any new activity will remove the stale label automatically. If nothing changes in the next 10 days, we will close it to keep the backlog current. |
Make the shared memory file location configurable via SCORE_LOG_SHM_DIR environment variable while maintaining backward compatibility (defaults to /tmp/). This enables containerized deployments where both the datarouter and applications run in separate containers and communicate via shared memory files. By configuring a specific subdirectory (e.g., /tmp/score-logging or /dev/shm/logging), containers can share only that directory via volume mounts without exposing the entire /tmp or /dev/shm filesystem, which may be used for other purposes by other applications. Changes: - Add path_utils module for shared directory path resolution - Update writer_factory.cpp to use configurable path - Update socketserver.cpp to use configurable path - Auto-create directory if it doesn't exist (0755 permissions) - Add unit tests for path utilities (6 tests, all passing) - Update BUILD files to integrate path_utils library Environment variable: - SCORE_LOG_SHM_DIR: Directory for shared memory files (default: "/tmp/") Example usage for containerized datarouter + application: # Both containers set: export SCORE_LOG_SHM_DIR=/tmp/score-logging # And mount the same volume at /tmp/score-logging The environment variable also allows flexible deployment for better performance (e.g., /dev/shm on Linux) while ensuring both application and datarouter sides use identical paths. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
53640e1 to
f08c129
Compare
Make the shared memory file location configurable via SCORE_LOG_SHM_DIR environment variable while maintaining backward compatibility (defaults to /tmp/).
This enables containerized deployments where both the datarouter and applications run in separate containers and communicate via shared memory files. By configuring a specific subdirectory (e.g., /tmp/score-logging or /dev/shm/logging), containers can share only that directory via volume mounts without exposing the entire /tmp or /dev/shm filesystem, which may be used for other purposes by other applications.
Changes:
Environment variable:
Example usage for containerized datarouter + application:
Both containers set:
export SCORE_LOG_SHM_DIR=/tmp/score-logging
And mount the same volume at /tmp/score-logging
The environment variable also allows flexible deployment for better performance (e.g., /dev/shm on Linux) while ensuring both application and datarouter sides use identical paths.
Notes for Reviewer
Pre-Review Checklist for the PR Author
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References
Closes #