-
Notifications
You must be signed in to change notification settings - Fork 494
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
"sortedRanges" exception when querying Unique Key IN list #833
Comments
Seems that keys longer than 100 characters are causing the failures. If I filter for keys less than 100 characters in length, I don't receive the exception |
Hi @kweebtronic , Thanks for repo. For some reason it's getting overlapping ranges which causes the validation to fail. It doesn't seem to necessarily be just string length either. If you set objectKey to RandomString(108) the test passes. I'll update this issue once I have a root cause and fix. |
@kweebtronic you can set the partition key definition to v2 type. The v2 partition key implementation handles larger partition key values. This can be a workaround until the v1 partition key definition fix is released. |
Thanks @j82w - is this possible in the v3 SDK? You've given a link for v2. Looks like a more manual approach than database.DefineContainer ... I just have to instantiate ContainerProperties and set the property Edit: found a less-idiomatic approach for creating, so that I can set this NOW:
versus THEN:
|
The article needs to be updated to show v3 SDK. The sample you provided looks correct to me. There is a gap in the define container builder. I'll try to get out PRs for both of these today. |
@kweebtronic 3.3.0 was just released. It contains the partition key fix and the builder definition updates. |
Describe the bug
Query for documents where the string property "objectKey" appears in a list of strings
objectKey is defined as partition key AND unique key for the collection
Cosmos DB is returning "sortedRanges" exception.
To Reproduce
Run attached test harness below
Then query the offending rows directly using data explorer - same error
Expected behavior
Data retrieved
Actual behavior
sortedRanges exception
Environment summary
SDK Version: 3.2.0
OS Version (e.g. Windows, Linux, MacOSX): Windows 10 (1903) x64
Additional context
The text was updated successfully, but these errors were encountered: