Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vault Queries using OR combinator and filter condition throw pagination errors when page limit is not exceeded

See original GitHub issue


As per the defined specification, vault queries using the vault query API throw VaultQueryException in case PageSpecification is not defined and the number of results exceed the default page size (200). I have a query that uses OR combinator to join two filter queries (one using a custom schema attribute) and another looking up based on StateRef where the result of the queries is below the defined pagination limit yet the vault query API flags pagination error. If I define a pagination limit, then the error is not thrown and the result size is within the pagination limit. If I don’t use the OR operator and perform the composition myself, the error is not thrown either.

Steps to Reproduce

The bug is reproduced here:

Run the MockNetwork test VaultQueryTests and observe that the test which uses vault query with OR combinator and without defining a page specification fails. Note that the other tests which use OR combinator with page specification and composition of the individual queries without OR combinator and page specification succeed. Also note that each of the filter queries return exactly one result and combining them using OR returns 2 results.

Note that the example might appear a bit contrived but that has been done for simplification.

It appears servicesForResolution.loadStates(stateRefs) in NodeVaultService._queryBy is filtering/loading the relevant stateRefs but the pagination error is thrown much before that based on an intermediate result results.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

r3jirabotcommented, Jun 29, 2020

Automatically created Jira issue: CORDA-3874

boniicommented, Jul 6, 2020

Hi @nikinagy, Yes but that is a workaround for the OR combinator which I created to help in reproducibility of the bug under different cases. I don’t think you mean to say that do not use the OR combinator and the bug will not be fixed in Corda?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web service error codes (Microsoft Dataverse) - Power Apps
Message: The Inner Query must not be an aggregate query. Message: The maximum record limit is exceeded. Reduce the number of records. Message: ......
Read more >
All other San Diego fixes - ServiceNow Docs
When running any CMDB query, the following error displays in the system logs: 'Failed to capture the event processor_query: no thrown error'.
Read more >
Glacier — Boto3 Docs 1.26.32 documentation - Amazon AWS
Each vault can have up to 10 tags. If your request would cause the tag limit for the vault to be exceeded, the...
Read more >
SAP S/4HANA OData Connector 2.5 Reference - Mule 4
Executes a retrieve operation on the SAP S/4HANA instance filtering the result by key. If no elements are found an error is thrown....
Read more >
Resolve issues with throttled DynamoDB tables - AWS
To resolve this issue, make sure that your table has enough capacity to serve your traffic and retry throttled requests using exponential ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found