- Change: semians will trigger on ER_PROXYSQL_MAX_CONN_TIMEOUT with mysql2 (#522)
- Change: added support for dynamic semian_configurations to the Semian Redis adapter
- New:
Semian.disable_bulkheads_for_thread
disables bulkheads for the given thread
- Fix: Trilogy ActiveRecord adapter to be compatible with latest Rails edge.
- Change: Trilogy ActiveRecord adapter will not bypass "SAVEPOINT RELEASE" unless it uses the ActiveRecord default name and only 2 levels of nesting
- Change: The bypass for COMMIT/ROLLBACK statements assumes current ActiveRecord behaviour, that is no blank spaces or ";" chracter at the end of the statement
- Fix valid_raw_connection check
- Fixed compatibility with redis-rb 5.0.7+
- More efficient activerecord_trilogy_adapter and mysql2_adapter regex. (#508, #510)
- Ensure Active Record Trilogy adapter handles AdapterTimeout and ConnectionFailed exceptions. (#497)
- Allow passing --with-openssl-dir for a custom OpenSSL installation. (#499)
- Use ActiveRecord::ConnectionNotEstablished as base error for TrilogyAdapter. (#496)
- Fix Mysql2 connection error regular expressions. (#506)
- Active Record Trilogy adapter needs to patch
#raw_execute
instead of#execute
for queries. (#494)
- Redis Readonly errors won't trigger semian open circuit. (#489)
- New
dynamic
options, allowing a per-request resource configuration with the HTTP adapter. (#485)
- Remove dependency on activerecord-trilogy-adapter in Trilogy adapter for Semian. (#486)
- Fix: Change in method signature for Trilogy adapter's
#execute_method
. (#491)
- Support Active Record Trilogy adapter. (#468)
- Avoid prepending the same prefix twice to errors messages. (#423)
This mostly happens with the
redis-rb 5+
gem as it translateredis-client
errors. - Fix running tests in DEBUG mode to test missing semaphores resources. (#430)
Semian.register
returnsUnprotectedResource
when environment variableSEMIAN_DISABLED
is set. (#427) Introduces environment variablesSEMIAN_CIRCUIT_BREAKER_DISABLED
to disable onlycircuit_breaker
andSEMIAN_BULKHEAD_DISABLED
onlybulkhead
.- Refactor: Replace
Time.now
withCLOCK_MONOTONIC
in Resourceupdated_at
field. (#443) ReplaceTimecop.travel
for tests with custom mock solution to support monotonic clocks. - Refactor: Replace
Time.now
withCLOCK_MONOTONIC
inCircuitBreaker
. (#441) - Support Ruby 3.2.0. (#463)
- Enable write barrier protection on Resource. (#469)
- Typo in error message for missing option
:tickets
. (#412) - Add process id in DEBUG message for bulkheading/resource. (#416)
- Feature: Add ability to turn off window based circuit eviction (#418)
- Pinging a closed connection shouldn't be considered a failure. (#396)
- Fix: Patch
new_client
for Rails apps so that the OpenCircuitError makes it through. (#395)
- Compatible with Redis 5 (#388, #392)
- Add a warning message about redis 5.x. (#386)
- Fix: Update AbstractAdapter patch to accomodate recent Rails changes. (#364)
- Fix: Raise
Redis::OutOfMemoryError
for messages that matchOOM command not allowed when used memory > 'maxmemory'
rather than checkingstart_with?("OOM ")
. (#367)
- Refactor: Replace Time.now with CLOCK_MONOTONIC in MockServer (#318)
- Fix: Circuit not open for GRPC::ActiveCall::Operation failures (#348)
- Feature: Add support for the
redis-client
gem (#314)
- Feature: Add error_threshold_timeout configuration parameter (#299)
- Fix: ECONNRESET won't trigger circuit open for redis (#306)
- Fix: pass disable flag by patching new singleton method (#303)
- Feature: Add disable flag to http adapter (#301)
- Fix: Add
extern
to global variable declarations for gcc 10 (#288)
- Feature: Log last error message on circuit breaker state transition (#285)
- Fix: Update README and docs to resolve common misconception about error_threshold (#283)
- Fix: Remove
MySQL client is not connected
error from mysql2 adapter
- Feature: Add
Semian.namespace
to globally prefix all the semaphore names. (#280)
- Feature: Add
Semian.default_permissions
to globally change the default semaphore permissions. (#279)
- Fix: Match whitelisted SQL queries when Marginalia is prepended (#276)
- Fix: Compatibility with GC.compact
- Fix: Revert the changes in v0.10.3. (#270)
- Fix: Positional/Keyword arguments deprecations warning for Ruby 2.7 in the grpc adapter. (#269)
- Fix: Positional/Keyword arguments deprecations warning for Ruby 2.7.
- Fix: thread safety bug on Ruby 2.7. (#263)
- Feature: Support half open resource timeout for redis.
- Fix: Compatibility with MRI 2.3
- Feature: Add a LRU to garbage collect old resources. (#193)
- Fix: Recursion issue in MySQL2 adapter causing circuits breakers to stay open much longer than they should. (#250)
- Fix: Better handle DNS resolutions exceptions in Redis adapter. (#230)
- Feature: Introduce the GRPC adapter (#200)
- Fix: Instrument success for
acquire_circuit_breaker
(#209)
- Feature: If an error instance responds to
#marks_semian_circuits?
don't mark the circuit if it returns false (#210)
- Fix: Redis adapter using hiredis is resilient to DNS resolution failures (#205)
- Feature: Introduce
half_open_resource_timeout
which changes the resource timeout when the circuit is in a half-open state for the Net::HTTP adapter. (#198) - Feature: Add the cause of the last error when a circuit opens (#197)
- Fix: Reset successes when transitioning to the half open state (#192)
- Fix: Expose
half_open?
when the circuit state has not transitioned but will. This allows consumers further up the stack to know if the circuit is half open.
- Feature: Introduce
half_open_resource_timeout
which changes the resource timeout when the circuit is in a half-open state (#188)
- Feature: More informative error messages when initializing Semian with missing arguments (#182)
- Fix: Redis adapter is now resilient to DNS resolution failures (#184)
- Fix: Repaired compatibility with dependent Redis library
- Fix: Protect internal semaphore when adjusting resource count (#164)
- Feature: Use prepend when monkey-patching Net::HTTP. (#157)
- Feature: Include time spend waiting for bulkhead in notification (#154)
- Feature: Add the behaviour to enable open circuiting on 5xxs conditionally (#149)
- Refactor: Configurable hosts for Semian's development dependencies (#152)
This change introduced a series of changes to support a new "dynamic quota" ticket allocation strategy. This code primarily affects bulkheads (protected resources).
Rather than statically setting a ticket count, workers (in their own process) now register themselves. By specifying 'quota' instead of 'tickets', the bulkhead threshold will now be computed dynamically as a ratio of the number of registered workers, eliminating the need to continuously readjust ticket counts, and supporting environments with non-uniform worker distribution between machines.
- Feature: Support quota based allocation strategy (#120)
- Feature: Add ability to manually unregister workers (#130)
- Feature: Add ability to clear resources from adapters and unregister all resources (#134)
- Feature: Allow sysV IPC key to be accessed in ruby (#136)
- Feature: Expose registered worker count to ruby (#137)
- Refactor: Allow registered worker count to be accessed through bulkhead (#138)
- Bug fix: Register all workers (#128)
- Bug fix: Lazy instantiate redis clien on first I/O (#132)
- Bug fix: New mysql error (#131)
- Bug fix: Prevent race conditions when unregistering (#141)
- Refactor/Feature: Break coupling between resource and circuit breaker (#123)
- Refactor: Use generic max_sem_val (#117)
- Refactor: Fix header syntax (#118)
- Refactor: Always acquire semaphore without_gvl (#121)
- Thread-safety for circuit breakers by default (#150)
- Fix bug where calling name on a protected resource without a semaphore would fail (#151)
- Refactor: Refactor semian ticket management into its own files (#116)
- Refactor: Create sem_meta_lock and sem_meta_unlock (#115)
- Refactor: Refactor semaphore operations (#114)
- Refactor: Generate a unique semaphore key by including size of semaphore set
- Refactor: Refactor semian_resource related C functions
- Fix: Don't require sudo for travis (#110)
- Refactor: Refactor semian.c includes and types into header files
- Fix: Use glob instead of git for gemspec file list
- Fix: Fix travis CI for ruby 2.3.0 installing rainbows
- Refactor: Switch to enumerated type for tracking semaphore indices
- Docs: readme: explain co-operation between cbs and bulkheads
- Docs: readme: add section about server limits
- Feature: Load semian/rails automatically if necessary
- Feature: Implement AR::AbstractAdapter#semian_resource
- Fix: Also let "Too many connections" be a first class conn error
- Fix: mysql: protect pings
- Fix: mysql: match more lost conn queries
- Fix: Make request_allowed? thread safe
- Fix: Fix CI connect errors on HTTP requests by using 127.0.0.1 for host
- Fix: Assert Resource#initialize_semaphore contract on Resource init
- Fix: Lock on older thin version for pre MRI 2.2 compatibility
- Fix: Only issue unsupported or disabled semaphores warnings when the first resource is instanciated
- Refactor: Cleanup requires
- Maintenance: Use published version of the toxiproxy gem
- Fix: Fix minitest deprecation warnings
- Maintenance: Update bundler on travis
- Maintenance: Update supported MRI versions on travis
- Fix: Fix lazy aliasing of Redis#semian_resource
- Fix: Workaround rubocop parser limitations
- Fix: Fix for TimeoutError is deprecated in Ruby 2.3.0
- Feature: Include Ruby 2.3 in Travis builds
- Fix: resource: cast float ticket count to fixnum #75
- Feature: net/http: add adapter for net/http #58
- Refactor: circuit_breaker: split circuit breaker into three data structures to allow for alternative implementations in the future #62
- Fix: mysql: don't prevent rollbacks on transactions #60
- Fix: core: fix initialization bug when the resource is accessed before the options are set #65