Skip to content

v3 circuit breaker - #683

Merged
kacper-kozera merged 5 commits into
v3from
feature/v3-circuit-breaker
Nov 12, 2026
Merged

kacper-kozera merged 5 commits into
v3from
feature/v3-circuit-breaker

Conversation

@kacper-kozera

Copy link
Copy Markdown

No description provided.

Signed-off-by: Kacper Kozera <kacper.kozera@here.com>
Signed-off-by: Kacper Kozera <kacper.kozera@here.com>
Signed-off-by: Kacper Kozera <kacper.kozera@here.com>
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Code Coverage

Overall Project 60.79% -0.18% 🍏
Files changed 73.82% 🍏

File Coverage
RequestSenderCache.java 100% 🍏
ECircuitBreakerImpl.java 100% 🍏
Resilience4jCircuitBreaker.java 95.6% -4.4% 🍏
HttpStorageValidation.java 88.64% -8.12% 🍏
CircuitBreakerCache.java 78.83% -21.17% 🍏
HttpStorageProperties.java 76.86% -4.55% 🍏
CircuitBreakerProps.java 74.85% -25.15% 🍏
RequestSender.java 70.94% -9.19% 🍏
HttpStorageReadSession.java 69.71% -4.41% 🍏
CircuitBreakerProvider.java 58.82% -41.18% 🍏
HttpStorage.java 55.86% -9.01% 🍏
CircuitBreakerOpenException.java 55.56% -44.44% 🍏
HttpStorageWriteSession.java 0% -48.25% 🍏

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Code Coverage

Overall Project 60.79% -0.18% 🍏
Files changed 73.62% 🍏

File Coverage
RequestSenderCache.java 100% 🍏
ECircuitBreakerImpl.java 100% 🍏
Resilience4jCircuitBreaker.java 95.6% -4.4% 🍏
HttpStorageValidation.java 88.64% -8.12% 🍏
CircuitBreakerCache.java 77.37% -22.63% 🍏
HttpStorageProperties.java 76.86% -4.55% 🍏
CircuitBreakerProps.java 74.85% -25.15% 🍏
RequestSender.java 70.94% -9.19% 🍏
HttpStorageReadSession.java 69.71% -4.41% 🍏
CircuitBreakerProvider.java 58.82% -41.18% 🍏
HttpStorage.java 55.86% -9.01% 🍏
CircuitBreakerOpenException.java 55.56% -44.44% 🍏
HttpStorageWriteSession.java 0% -48.25% 🍏

@kacper-kozera
kacper-kozera force-pushed the feature/v3-circuit-breaker branch from 419d0f6 to 0aad6d0 Compare November 3, 2026 10:18
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Code Coverage

Overall Project 60.79% -0.18% 🍏
Files changed 73.82% 🍏

File Coverage
RequestSenderCache.java 100% 🍏
ECircuitBreakerImpl.java 100% 🍏
Resilience4jCircuitBreaker.java 95.6% -4.4% 🍏
HttpStorageValidation.java 88.64% -8.12% 🍏
CircuitBreakerCache.java 78.83% -21.17% 🍏
HttpStorageProperties.java 76.86% -4.55% 🍏
CircuitBreakerProps.java 74.85% -25.15% 🍏
RequestSender.java 70.94% -9.19% 🍏
HttpStorageReadSession.java 69.71% -4.41% 🍏
CircuitBreakerProvider.java 58.82% -41.18% 🍏
HttpStorage.java 55.86% -9.01% 🍏
CircuitBreakerOpenException.java 55.56% -44.44% 🍏
HttpStorageWriteSession.java 0% -48.25% 🍏

case ffwAdapter ->
new ErrorResponse(NakshaError.NOT_IMPLEMENTED, "Writing not supported by underlying storage");
case dataHubConnector ->
new ConnectorInterfaceWriteExecute(getNakshaContext(), request, getRequestSender()).execute();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need also to move default as we did in ReadSession

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the default and converted the ReadSession switch to a switch expression, consistent with the write switch.

|| cbConfig.getSlowCallRateThreshold() == null
|| cbConfig.getWaitDurationInOpenStateMs() == null
|| cbConfig.getPermittedNumberOfCallsInHalfOpenState() == null) {
throw new IllegalArgumentException("circuitBreaker configuration is iconcomplete");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in iconcomplete

Signed-off-by: Kacper Kozera <kacper.kozera@here.com>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Code Coverage

Overall Project 60.84% -0.17% 🍏
Files changed 74.52% 🍏

File Coverage
RequestSenderCache.java 100% 🍏
ECircuitBreakerImpl.java 100% 🍏
Resilience4jCircuitBreaker.java 95.6% -4.4% 🍏
HttpStorageValidation.java 88.64% -8.12% 🍏
CircuitBreakerCache.java 78.83% -21.17% 🍏
HttpStorageProperties.java 76.86% -4.55% 🍏
CircuitBreakerProps.java 74.85% -25.15% 🍏
HttpStorageReadSession.java 71.69% -1.81% 🍏
RequestSender.java 70.94% -9.19% 🍏
CircuitBreakerProvider.java 58.82% -41.18% 🍏
HttpStorage.java 55.86% -9.01% 🍏
CircuitBreakerOpenException.java 55.56% -44.44% 🍏
HttpStorageWriteSession.java 0% -48.25% 🍏

Comment thread docs/HTTP_STORAGE_CIRCUIT_BREAKER.md Outdated
"headers": {
"Authorization": "Bearer token123"
},
"circuitBreaker": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us stick with "circuitBreakerConfig" everywhere. There is an issue with v2 implementation and already raised a MR for this.

"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
"circuitBreaker": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"circuitBreakerConfig" instead of "circuitBreaker"

"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
"circuitBreaker": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"circuitBreakerConfig" instead of "circuitBreaker"

"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
"circuitBreaker": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"circuitBreakerConfig" instead of "circuitBreaker"

"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
"circuitBreaker": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"circuitBreakerConfig" instead of "circuitBreaker"

"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
"circuitBreaker": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"circuitBreakerConfig" instead of "circuitBreaker"

"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
"circuitBreaker": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"circuitBreakerConfig" instead of "circuitBreaker"

private static final String HEADERS = "headers";

private static final String HTTP_INTERFACE = "httpInterface";
private static final String CIRCUIT_BREAKER = "circuitBreaker";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"circuitBreakerConfig" instead of "circuitBreaker"

Signed-off-by: Kacper Kozera <kacper.kozera@here.com>
@github-actions

Copy link
Copy Markdown

Code Coverage

Overall Project 61.57% -0.17% 🍏
Files changed 74.52% 🍏

File Coverage
RequestSenderCache.java 100% 🍏
ECircuitBreakerImpl.java 100% 🍏
Resilience4jCircuitBreaker.java 95.6% -4.4% 🍏
HttpStorageValidation.java 88.64% -8.12% 🍏
CircuitBreakerCache.java 78.83% -21.17% 🍏
HttpStorageProperties.java 76.86% -4.55% 🍏
CircuitBreakerProps.java 74.85% -25.15% 🍏
HttpStorageReadSession.java 71.69% -1.81% 🍏
RequestSender.java 70.94% -9.19% 🍏
CircuitBreakerProvider.java 58.82% -41.18% 🍏
HttpStorage.java 55.86% -9.01% 🍏
CircuitBreakerOpenException.java 55.56% -44.44% 🍏
HttpStorageWriteSession.java 0% -48.25% 🍏

@kacper-kozera
kacper-kozera requested a review from rlakde November 10, 2026 12:21
@kacper-kozera
kacper-kozera merged commit 6fa1fce into v3 Nov 12, 2026
3 checks passed
@kacper-kozera
kacper-kozera deleted the feature/v3-circuit-breaker branch November 12, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants