-
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-10801: Port CASSANDRA-19461 (fix bug about SAI and empty strings) #1284
base: main
Are you sure you want to change the base?
Conversation
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.
While I support this patch, I think that this is a breaking behavior change, and it may break existing applications.
What was the behaviour in DSE ? (the version we have in Astra DSE)
It is not a breaking useful behavior. Prior to this patch a query for "" would always return nothing if there was an index, and something if there was not an index and ALLOW FILTERING used. Running a query that will never return results is not useful, so we are fine. I would think this is actually a bug fix. We should have been rejecting a query for "" or returning the answer, not returning an empty result set. This makes us actually return the answer. Also to make sure, empty string is different from deleted? |
6.9 is also affected, it has the same behaviour as CC. I'm almost sure it's the same in 6.8, since the code is identical and it seems no one noticed this issue before.
Yes, setting the column to |
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.
Left a comment about VectorMemtableIndex
index
method.
It seems sonar is also unhappy on test coverage and I did not find the butler diff link.
While index format seems not to be affected, you mentioned people would have to rebuild their indexes to see the change. How do we flag that for them? How is such a fix handled normally in Astra? I'm not sure.
Is the plan to finish first this PR and then the 5.0 rebase branch? We seem to miss the new orderBy
test there.
…Column for new expectations
Thanks for the review. I have updated Regarding Sonar failures, I haven't ported the tests for Regarding how we flag that people would need to rebuild the indexes to benefit from this fix, I'm not sure. We cannot detect it at query time because lots of queries can be affected. For example, a simple |
Quality Gate failedFailed conditions |
Ports CASSANDRA-19461 into
main
.Currently, SAI doesn't create an index entry for empty values. As a result, index queries such as
SELECT * FROM %s WHERE v = ''
will never find anything. However, the same query withALLOW FILTERING
can find rows.The ported patch makes sure that empty values are indexed. However, existing indexes would need a rebuild to have these entries.
We need to evaluate if this can be a breaking change for some users. The only side effect I can think of is that indexes with many empty values that are never queries would become larger after this change.