Conversation
|
update commit message name |
| validate-index-not-being-resharded (when-not (nil? reshard-status) | ||
| (errors/throw-service-error | ||
| :bad-request | ||
| (format "Index [%s] is in a current resharding state of [%s]. You cannot reshard an index that is currently being resharded." index reshard-status))) |
There was a problem hiding this comment.
kind of a weird wording for the error message and could be more helpful, maybe something like
IN_PROGRESS: "currently being resharded, wait for it to finish or rollback"
COMPLETE: "resharding has completed but not been finalized, finalize or rollback first"
FAILED: "a previous reshard failed, rollback before retrying"
for each state
There was a problem hiding this comment.
I don't think we need this specific level of logging. If the dev knows the current resharding state, they should know what to do next
There was a problem hiding this comment.
its pretty confusing, especially for COMPLETE, it seems like "currently being resharded" would indicate an in progress action to wait for and not necessarily something that you would take an action to resolve, similar for FAILED.
and "is in a current sharding state" is kinda clunky, "has a resharding state of" or "Index [%s] already has a reshard in state [%s]. Finalize or roll back the existing reshard before starting a new one."
There was a problem hiding this comment.
I can change the wording to be something like this: "Index [%s] has a resharding state of [%s]. You cannot start a new reshard on an index that is in a existing reshard state."
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2466 +/- ##
==========================================
- Coverage 57.93% 57.92% -0.01%
==========================================
Files 1073 1073
Lines 74651 74656 +5
Branches 2172 2169 -3
==========================================
+ Hits 43246 43248 +2
- Misses 29375 29380 +5
+ Partials 2030 2028 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
* add error logic and sys tests * change get-reshard-status func and some minor cosmetic changes * use is-resharding * update err msg and tests * make test wait for index before checking results to fix inconsistent test fails
Overview
What is the objective?
When trying to reshard indexes and a failed or non finalized resharded index from another CMR session exists, the start end point fails with a 500 Error.
What should happen is a more descriptive error is returned so that users know what the actual issue is. A different http status code and message.
What are the changes?
Updated 'already exist' or 'already resharding' or 'already rebalancing' errors to return 400 instead of 500 with better messaging
What areas of the application does this impact?
Indexer
Required Checklist
Additional Checklist