Skip to content

FINERACT-1795: Improve resilience of command processing service#2727

Merged
vidakovic merged 1 commit intoapache:developfrom
vidakovic:feature/FINERACT-1795
Nov 7, 2022
Merged

FINERACT-1795: Improve resilience of command processing service#2727
vidakovic merged 1 commit intoapache:developfrom
vidakovic:feature/FINERACT-1795

Conversation

@vidakovic
Copy link
Copy Markdown
Contributor

Improve the resilience of the command processing service and make retry (and other parameters) configurable (provide reasonable defaults).

The current retry mechanics in place are causing various congestion issues in high traffic deployments. Besides that, we always have to lookup the tenant to retrieve the retry configuration; Spring Boot's application.properties are the proper place for that.

Retries are used currently with 4 service function calls and the code used to implement retries is very repetitive and not very adjustable.

@vidakovic vidakovic requested a review from galovics November 6, 2022 09:51
@vidakovic vidakovic force-pushed the feature/FINERACT-1795 branch from 7d531dc to 58bb29f Compare November 6, 2022 10:16
@vidakovic vidakovic self-assigned this Nov 6, 2022
@vidakovic
Copy link
Copy Markdown
Contributor Author

I've investigated that failure a bit and can't make any sense of it. The server side exception mapping seems to be OK as far as I can tell (investigated all execution paths). Nevertheless, on the integration test we get a HTTP 204 instead of 404. As far as I can see this is not related to my PR (made no changes in the area where things are breaking).

@vidakovic vidakovic force-pushed the feature/FINERACT-1795 branch from 58bb29f to d8e9ee4 Compare November 6, 2022 18:12
@vidakovic
Copy link
Copy Markdown
Contributor Author

I think I found it... tricky. Needed to re-throw exception in logCommand fallback method; it was swallowing the exceptions and that resulted utlimately in the HTTP 204 code.

@vidakovic vidakovic force-pushed the feature/FINERACT-1795 branch from d8e9ee4 to 3a34bde Compare November 6, 2022 21:12
@vidakovic
Copy link
Copy Markdown
Contributor Author

Adjusting the tests took more time than should be necessary... the whole tenant based database setup is impossible to mock for testing... there are just to many factories inside of factories calling static functions in some obscure utility classes.
Found a solution for now and left a comment.

@vidakovic vidakovic force-pushed the feature/FINERACT-1795 branch 3 times, most recently from cac5b23 to dc190bc Compare November 7, 2022 07:33
@vidakovic
Copy link
Copy Markdown
Contributor Author

Alright... I think that's it. Removed some overly complex error handling for some retry scenarios and fixed a hidden issue in one of the retry fallback functions (missing return type leads to wrong method signature).

@vidakovic vidakovic force-pushed the feature/FINERACT-1795 branch 3 times, most recently from 1e3a1cf to 29142ce Compare November 7, 2022 13:39
@vidakovic
Copy link
Copy Markdown
Contributor Author

Added documentation and more cleanups.

@vidakovic vidakovic force-pushed the feature/FINERACT-1795 branch from 29142ce to 8444981 Compare November 7, 2022 17:25
@vidakovic vidakovic force-pushed the feature/FINERACT-1795 branch from 8444981 to 53b5a72 Compare November 7, 2022 17:52
@vidakovic vidakovic merged commit 744abd1 into apache:develop Nov 7, 2022
@vidakovic vidakovic deleted the feature/FINERACT-1795 branch November 7, 2022 20: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.

2 participants