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

[BUG] conflict feed queries with count aggregation return empty results #43777

Open
3 tasks done
tvaron3 opened this issue Jan 13, 2025 · 0 comments
Open
3 tasks done
Assignees
Labels

Comments

@tvaron3
Copy link
Member

tvaron3 commented Jan 13, 2025

Describe the bug
conflict feed queries with count aggregation return empty results. Serialization of query node is failing because expecting storeResponse with resourceKey Document instead of Conflict.

To Reproduce
Steps to reproduce the behavior:
Create some conflicts in a container. Try a count query on a conflict feed.

Code Snippet

CosmosAsyncClient client = new CosmosClientBuilder().endpoint(serviceEndpoint).key(key).buildAsyncClient();
CosmosAsyncDatabase db = client.getDatabase("db1");
CosmosAsyncContainer cont = db.getContainer("container");
CosmosQueryRequestOptions options = new CosmosQueryRequestOptions();
options.setPartitionKey(new PartitionKey(0));


CosmosPagedFlux<CosmosConflictProperties> conflictCountQuery = cont.queryConflicts("select value count(1) from c");

List<FeedResponse<CosmosConflictProperties>> conflictCountQueryResults = conflictCountQuery.byPage().collectList().block();
for (FeedResponse<CosmosConflictProperties> conflictCountQueryResult: conflictCountQueryResults) {
      System.out.println("Number of count conflicts: " + conflictCountQueryResult.getResults().size());
       System.out.println("Cosmos Diagnostics: " + conflictCountQueryResult.getCosmosDiagnostics());

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [e.g. iOS]
  • IDE: [e.g. IntelliJ]
  • Library/Libraries: [e.g. com.azure:azure-core:1.16.0 (groupId:artifactId:version)]
  • Java version: [e.g. 8]
  • App Server/Environment: [e.g. Tomcat, WildFly, Azure Function, Apache Spark, Databricks, IDE plugin or anything special]
  • Frameworks: [e.g. Spring Boot, Micronaut, Quarkus, etc]

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

  • verbose dependency tree (mvn dependency:tree -Dverbose)
  • exception message, full stack trace, and any available logs

Additional context
Add any other context about the problem here.

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
@tvaron3 tvaron3 added the Cosmos label Jan 13, 2025
@tvaron3 tvaron3 self-assigned this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant