apply post-optimization adversarial review fixes and pool improvements#14
Merged
Conversation
- refactor @connected to Concurrent::AtomicBoolean - invert call graph: set_sync/delete_sync own mutation logic - mset_sync holds mutex for atomic batch writes - add mget/mset/mset_sync for interface consistency - add exception handling on reads (get/fetch return nil) - add lifecycle rescue (setup/shutdown/restart force connected=false) - fix reset! race: make_false inside mutex before clearing store - add enforce_phi_ttl with minimum 1s clamp - add flush rescue returning false on error - add restart method
…improvements Phase A - adversarial review fixes: - force helper and cacheable to use async: false for read-after-write consistency - fix async writer TOCTOU race in enqueue (local executor reference) - add failed_count to async writer stats - fix reconnector deadlock, atomic reset, and missing require - add reconnect_shared! raising method, start reconnector on any shared failure - guard setup with enabled? check - make async writer and reconnector tier-aware for settings - apply serialization to redis mget/mset_sync, force binary encoding - pass auth/TLS options to redis cluster flush per-node connections - drain async writer before closing pools on shutdown Phase B - connection pool improvements: - remove hardcoded pool_size from redis driver, resolve from settings - separate pool checkout timeout from operation timeout - refactor state flags to Concurrent::AtomicBoolean for thread safety - add public pool accessor, replace direct @client access in redis_hash - add end-to-end lifecycle integration test - add automatic failback to local when shared cache unavailable - bump version to 1.4.1
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19c7eee8c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Summary
Test plan
RUN_INTEGRATION_SPECS=1 bundle exec rspecagainst live Redis/Memcached