Repository navigation
fix(#15034): COMPACT INDEX of an index that does not exist answers 400, not 500 - #15040
iklas-titan wants to merge 1 commit into
Conversation
…answers 400, not 500 The index is resolved before the try that wraps every failure in an IndexException, as REBUILD INDEX does, so a missing name is refused with the lookup's SchemaException (HTTP 400, gRPC NOT_FOUND) instead of an IndexException that reads as a server fault. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Tick the box to add this pull request to the merge queue (same as
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Triage: The change looks good.
I could only read the diff and could not run the tests. |
Closes #15034
What
COMPACT INDEX nopelooked the index up inside thetrythat wraps every failure in anIndexException, so theSchemaExceptionof a missing name was logged at SEVERE and answered HTTP 500. The named index is now resolved before thetry, asREBUILD INDEXdoes (#11803). A missing name answers HTTP 400SchemaException"Index with name 'nope' was not found" (gRPC still answers NOT_FOUND).COMPACT INDEX *is unchanged.Tests
CompactIndexStatementTest#compactingAnIndexThatDoesNotExistIsRefusedAsASchemaError(engine)HttpErrorStatusServerTest.SqlUserErrors#compactingAnIndexThatDoesNotExistIs400(server)Checked against a server built from this branch: HTTP 400 / gRPC NOT_FOUND, the same answer as REBUILD INDEX and DROP INDEX.
🤖 Generated with Claude Code