Skip to content
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

[Cosmos DB] "sortedRanges" exception when querying Unique Key IN list #19911

Closed
3 tasks done
krisnik opened this issue Mar 17, 2021 · 3 comments · Fixed by #21078
Closed
3 tasks done

[Cosmos DB] "sortedRanges" exception when querying Unique Key IN list #19911

krisnik opened this issue Mar 17, 2021 · 3 comments · Fixed by #21078
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@krisnik
Copy link

krisnik commented Mar 17, 2021

Describe the bug

We are using queryItems method to run a SQL query and query multiple items from Cosmos DB

public <T> CosmosPagedIterable<T> queryItems(SqlQuerySpec querySpec, CosmosQueryRequestOptions options, Class<T> classType) {
        return this.getCosmosPagedIterable(this.asyncContainer.queryItems(querySpec, options, classType));
    }

The SQL Query that we have had is as follows

WHERE c.id IN ("opendes:at:slb-osdu-dev-sis-internal-hqtechlog--A52C-4031-99D1---124CBB92-8C80-4668-BB48-1329C5FE241-0","opendes:at:slb-osdu-dev-sis-internal-hqtechlog--A52C-4031-99D1---124CBB92-8C80-4668-BB48-1329C5FE241-1")

Here id is the partition key. The partition key is hashed based on the first 100 bytes. We haven't migrated to 2k bytes partition hashing yet.

To Reproduce

The above Where clause query with IN keyword consistently reproduces the issue.

Expected behavior
The query items API should successfully fetch the records.

Actual behavior
Exception thrown from RoutingMapProviderHelper -> throw new IllegalArgumentException("sortedRanges");

Environment summary
SDK Version: com.azure:azure-cosmos:4.7.1
Java JDK version: 1.8
OS Version (e.g. Windows, Linux, MacOSX) N/A

Additional context
Similar issue was reported for C# SDK - Azure/azure-cosmos-dotnet-v3#833

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 17, 2021
@kushagraThapar
Copy link
Member

@mbhaskar - can you please look at this bug / feature request ?

@joshfree joshfree added Client This issue points to a problem in the data-plane of the library. Cosmos labels Mar 17, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 17, 2021
@joshfree joshfree added this to the [2021] April milestone Mar 17, 2021
@krisnik
Copy link
Author

krisnik commented Mar 19, 2021

@joshfree / @mbhaskar - What would be the date for release of the April Milestone?

@mbhaskar
Copy link
Member

mbhaskar commented Apr 6, 2021

@krisnik This fix should be in by April end and would be included in the following release.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants