-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNDB-12620: Add new reason RequestFailureReason.INDEX_BUILD_IN_PROGRESS #1537
base: main
Are you sure you want to change the base?
Conversation
…codes according to Appache and avoid future conflicts by assigning new codes to higher numbers CNDB-7343: Fix fromCode method and add a unit test CNDB-7343: Update forException method for IndexNotAvailable CNDB-7343: Make forException method more resiliant against partial updates
96dad2a
to
537226c
Compare
Quality Gate passedIssues Measures |
❌ Build ds-cassandra-pr-gate/PR-1537 rejected by Butler1 new test failure(s) in 2 builds Found 1 new test failures
Found 9 known test failures |
org.apache.cassandra.utils.binlog.BinLogTest.testTruncationReleasesLogSpace - known flaky for a very long time - https://github.com/riptano/cndb/issues/10308. I guess it was just not failing lately in CI. Also, it did not fail locally for me and I do not see how it can be related to what we do here. |
assertThatThrownBy(() -> execute("SELECT * FROM %s WHERE v=0 ALLOW FILTERING")) | ||
.hasMessage("The secondary index '" + idx + "' is not yet available as it is building") | ||
.isInstanceOf(IndexBuildInProgressException.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why try to use the index and fail instead of use filtering if the user allowed it?
I thought if I set AF in the query, the query should always run regardless of index availability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AF issue is a different ticket where we are addressing this - #12425. Until that one is solved, we add as an intermediate this one as per agreement with interested parties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I have one loosely related question that doesn't block this PR.
@pkolaczk, thank you for. the review. Your question is valid and it will be addressed more thoroughly in a different ticket - #12425. I will not commit this one yet, until the rest of the PRs in the original issue are in a good shape. More on that in the GH issue. We will also need Stargate release. |
The second commit - cherry-picked one, should not be committed! It is just to help us build the current patch on top of the other work which is going to be committed soon.
What is the issue
...
Users should get
INDEX_BUILD_IN_PROGRESS
instead ofINDEX NOT AVAILABLE
when they cannot query because an index is building.What does this PR fix and why was it fixed
...
We add a new reason,
RequestFailureReason.INDEX_BUILD_IN_PROGRESS
to differentiate indexes that are currently building in error messagesChecklist before you submit for review
NoSpamLogger
for log lines that may appear frequently in the logs