Commit a2b7d9c
fix: address PR review feedback for v3.1.0
## Security & Stability Improvements
- Add path validation to prevent directory traversal attacks
- Set secure file permissions (0700) for mmap storage directories
- Improve error handling with circuit breaker for batch processing
- Add proper resource cleanup with __del__ for mmap files
## Configuration Enhancements
- Make overflow threshold configurable (default 80%)
- Make compression threshold configurable (default 1KB)
- Add mmap_storage_path configuration option
- Add mmap_cleanup_days for automatic old file removal
## Error Handling Improvements
- Better exception handling in batch processing
- Add circuit breaker after 10 consecutive failures
- Properly re-raise asyncio.CancelledError for clean shutdown
- Add detailed logging with exc_info for debugging
## Resource Management
- Implement proper cleanup in __del__ for mmap storage
- Add automatic cleanup of old overflow files (>7 days)
- Close all storage instances properly on cleanup
- Use contextlib.suppress for cleaner exception handling
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>1 parent cd42def commit a2b7d9c
File tree
4 files changed
+76
-16
lines changed- src/project_x_py
- client
- realtime_data_manager
- realtime
4 files changed
+76
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | | - | |
| 117 | + | |
| 118 | + | |
115 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
116 | 127 | | |
117 | 128 | | |
118 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
49 | 70 | | |
50 | 71 | | |
51 | 72 | | |
| |||
260 | 281 | | |
261 | 282 | | |
262 | 283 | | |
263 | | - | |
264 | | - | |
265 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
266 | 291 | | |
267 | 292 | | |
268 | | - | |
269 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
270 | 308 | | |
271 | 309 | | |
272 | 310 | | |
273 | 311 | | |
274 | 312 | | |
275 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
276 | 321 | | |
277 | 322 | | |
278 | 323 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments