You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're working with a CouchDB database that holds about 272 million records. When attempting to retrieve all documents using a curl command and writing to a file, we noticed that only 268435456 records were returned, despite the database having more entries.
The curl command in question:
curl -k -X GET "https://$(cat credential_couchdb)@{host}/{db}/_all_docs?include_docs=true" > all_docs
This led us to suspect a default query limit issue, which aligns with discussions in this GitHub pull request.
To resolve this, we updated the config file to set both partition_query_limit and query_limit to 536870912 (2^29).
Despite this change and the offset field from the output file displaying the correct amount of total records, the output still holds 268435456 records.
Expected Behaviour
We expect the number of records in the output file to match the offset field value, not to be stuck in this default value count.
Additional Context
The CouchDB instance in question is integrated as a state database within a Hyperledger Fabric setup.
The database is updated once a day.
laisuchoa
changed the title
Query limit configuration not reflecting expected document retrieval count in large database
Query exporting only 2ˆ28 documents (data have more) even after setting query limit to 2ˆ29
Aug 19, 2024
Description
We're working with a CouchDB database that holds about 272 million records. When attempting to retrieve all documents using a curl command and writing to a file, we noticed that only 268435456 records were returned, despite the database having more entries.
The curl command in question:
curl -k -X GET "https://$(cat credential_couchdb)@{host}/{db}/_all_docs?include_docs=true" > all_docs
This led us to suspect a default query limit issue, which aligns with discussions in this GitHub pull request.
To resolve this, we updated the config file to set both partition_query_limit and query_limit to 536870912 (2^29).
"query_server_config":{"partition_query_limit":"536870912","query_limit":"536870912"}
Despite this change and the offset field from the output file displaying the correct amount of total records, the output still holds 268435456 records.
Expected Behaviour
We expect the number of records in the output file to match the offset field value, not to be stuck in this default value count.
Additional Context
The CouchDB instance in question is integrated as a state database within a Hyperledger Fabric setup.
The database is updated once a day.
@lucasmation
The text was updated successfully, but these errors were encountered: