Skip to content

Commit 159f8eb

Browse files
author
Chris Elder
committed
[FAB-4455] Change location of queryLimit in core.yaml
Since the queryLimit setting only applies to couchDB, the value in core.yaml ledger.state.queryLimit should change to ledger.state.couchDBConfig.queryLimit. This is an administrative change and does not impact any functionality visible to the user. Change-Id: I5924bc4adec89959518b4a282bbcc1797c3a1b7f Signed-off-by: Chris Elder <[email protected]>
1 parent 5f23c19 commit 159f8eb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/chaincode/chaincodetest.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,9 @@ ledger:
446446
maxRetriesOnStartup: 10
447447
# CouchDB request timeout (unit: duration, e.g. 20s)
448448
requestTimeout: 35s
449+
# Limit on the number of records to return per query
450+
queryLimit: 10000
449451

450-
# Limit on the number of records to return per query
451-
queryLimit: 10000
452452

453453
history:
454454
# enableHistoryDatabase - options are true or false

core/ledger/ledgerconfig/ledger_config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ func GetMaxBlockfileSize() int {
6666

6767
//GetQueryLimit exposes the queryLimit variable
6868
func GetQueryLimit() int {
69-
queryLimit := viper.GetInt("ledger.state.queryLimit")
69+
queryLimit := viper.GetInt("ledger.state.couchDBConfig.queryLimit")
7070
// if queryLimit was unset, default to 10000
71-
if queryLimit == 0 {
71+
if !viper.IsSet("ledger.state.couchDBConfig.queryLimit") {
7272
queryLimit = 10000
7373
}
7474
return queryLimit

sampleconfig/core.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ ledger:
370370
maxRetriesOnStartup: 10
371371
# CouchDB request timeout (unit: duration, e.g. 20s)
372372
requestTimeout: 35s
373+
# Limit on the number of records to return per query
374+
queryLimit: 10000
373375

374-
# Limit on the number of records to return per query
375-
queryLimit: 10000
376376

377377
history:
378378
# enableHistoryDatabase - options are true or false

0 commit comments

Comments
 (0)