Add circuit breaker configuration support - #277
Merged
jeremyprime merged 2 commits intoJul 30, 2026
Conversation
jeremyprime
force-pushed
the
feat/circuit-breaker-config
branch
from
July 23, 2026 21:41
899a55e to
7ba5343
Compare
currantw
reviewed
Jul 28, 2026
jeremyprime
force-pushed
the
feat/circuit-breaker-config
branch
from
July 28, 2026 20:28
7ba5343 to
cec7239
Compare
prateek-kumar-improving
approved these changes
Jul 29, 2026
currantw
self-requested a review
July 29, 2026 17:11
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
jeremyprime
force-pushed
the
feat/circuit-breaker-config
branch
from
July 30, 2026 18:46
cec7239 to
de33eed
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.
Summary
Add circuit breaker configuration support to the PHP client, matching the existing implementation in Java, Python, Node, and Go (valkey-io/valkey-glide#6050). The circuit breaker logic lives in the Rust core; this change adds the config array parameter, serializes it to protobuf, and surfaces a
CircuitBreakerExceptiontype to callers.Issue link
Closes #238
Features / Behaviour Changes
?array $circuit_breakerparameter onValkeyGlide::connect()andValkeyGlideCluster::__construct()CircuitBreakerExceptionclass (extendsValkeyGlideException) thrown when the circuit breaker is openwindow_size_ms,failure_rate_threshold,min_errors,open_timeout_ms,count_timeouts,consecutive_successesImplementation
common.h: Addedvalkey_glide_circuit_breaker_config_tstruct, constants, and plumbed into base configvalkey_glide.c: Parse circuit breaker array, register exception class, cleanup on freevalkey_glide_core_commands.c: Serialize config toClientCircuitBreakerConfigprotobuf message (field 30)valkey_glide_commands_common.h: DispatchCircuitBreakerExceptionwhencommand_error_type == CircuitBreakerOpenTesting
ConnectionRequestTest.php:testCircuitBreakerStandaloneDefaults: empty array uses defaultstestCircuitBreakerClusterDefaults: same for clustertestCircuitBreakerStandaloneCustomValues: all fields customizedtestCircuitBreakerClusterCustomValues: same for clustertestCircuitBreakerNotSetByDefault: null when not providedChecklist