pjfanning opened a new pull request, #483:
URL: https://github.com/apache/pekko-persistence-cassandra/pull/483

   The journal and tag writers lack circuit breakers. A circuit breaker would 
prevent cascading failures when Cassandra is unavailable.
   
   Files modified:
   
   1. core/src/main/resources/reference.conf — Added circuit-breaker section 
under journal with max-failures = 0 (disabled by default), reset-timeout = 30s, 
call-timeout = 20s
   2. core/src/main/scala/.../journal/JournalSettings.scala — Added 
CircuitBreakerSettings case class and parsing from config
   3. core/src/main/scala/.../journal/CassandraJournal.scala —
     - Added CircuitBreaker import
     - Created writeCircuitBreaker instance (only when max-failures > 0)
     - Added logging callbacks for open/half-open/close state transitions
     - Wrapped executeBatch and execute methods with withCircuitBreaker
   4. core/src/test/scala/.../CassandraPluginSettingsSpec.scala — Added 3 tests 
for circuit breaker settings (disabled by default, enabled parsing, override)
   5. docs/src/main/paradox/journal.md — Added "Circuit breaker" subsection 
under Configuration
   
   Design decisions:
   - Disabled by default (max-failures = 0) — backward compatible, users opt in
   - Journal-level only — TagWriter has its own retry mechanism; if journal 
circuit is open, no events reach TagWriter anyway
   - Uses Pekko's built-in CircuitBreaker — well-tested, handles the state 
machine (closed → open → half-open → closed)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to