Re: Unable to Query data from Hyperledger Fabric #fabric-chaincode #hyperledger-fabric #couchdb


David Enyeart
 

Adding workarounds such as longer timeouts will only prolong your pain. You must address the root cause of the slow query in CouchDB. Troubleshoot it in a separate CouchDB environment until you have figured it out why the query/index are slow in CouchDB.
But honestly, if you expect to get back 20,000 records, you should consider the pattern of querying a downstream data store built from block events. Chaincode is optimized for transactions, not large queries.


Dave Enyeart

chintanr97---01/11/2021 11:50:53 PM---Hi David, The chaincode is performing a select query on the CouchDB documents, and the fields set fo

From: chintanr97@...
To: fabric@...
Date: 01/11/2021 11:50 PM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Unable to Query data from Hyperledger Fabric #couchdb #fabric-chaincode #hyperledger-fabric
Sent by: fabric@...





Hi David,

The chaincode is performing a select query on the CouchDB documents, and the fields set for filtering the results are indexed while installing and instantiating the chaincode. The single query using the Fabric Node SDK client might be reading around 20K-30K records.

We tried by overriding the peer configuration for following default values with the new values: "CORE_CHAINCODE_EXECUTETIMEOUT=300s" and CORE_PEER_KEEPALIVE_CLIENT_TIMEOUT=300s". We also tried with the SDK connection profile using a property: "grpc.keepalive_timeout_ms": "300000"

So I am not understanding, what we could be missing here. Because the other chaincodes in same channel are able to query the maximum limit of 100K records!



Join fabric@lists.hyperledger.org to automatically receive all group messages.