Skip to content

Commit bd12716

Browse files
committed
add back request_plus to make tests pass
1 parent 75c4379 commit bd12716

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

db/query.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ func (c *DatabaseCollection) QueryAllDocs(ctx context.Context, startKey string,
785785
// When using views, tombstoned documents are excluded.
786786
func (c *DatabaseCollection) CountAllDocs(ctx context.Context) (uint64, error) {
787787
if c.useViews() {
788-
opts := Body{"reduce": true}
788+
opts := Body{"stale": false, "reduce": true}
789789
results, err := c.dbCtx.ViewQueryWithStats(ctx, c.dataStore, DesignDocSyncHousekeeping(), ViewAllDocs, opts)
790790
if err != nil {
791791
return 0, err
@@ -803,7 +803,7 @@ func (c *DatabaseCollection) CountAllDocs(ctx context.Context) (uint64, error) {
803803
countDocsQueryStatement := replaceSyncTokensQuery(QueryCountDocs.statement, c.UseXattrs())
804804
countDocsQueryStatement = replaceIndexTokensQuery(countDocsQueryStatement, sgIndexes[IndexAllDocs], c.UseXattrs(), c.numIndexPartitions())
805805

806-
results, err := N1QLQueryWithStats(ctx, c.dataStore, QueryTypeCountDocs, countDocsQueryStatement, nil, base.NotBounded, QueryCountDocs.adhoc, c.dbStats(), c.slowQueryWarningThreshold())
806+
results, err := N1QLQueryWithStats(ctx, c.dataStore, QueryTypeCountDocs, countDocsQueryStatement, nil, base.RequestPlus, QueryCountDocs.adhoc, c.dbStats(), c.slowQueryWarningThreshold())
807807
if err != nil {
808808
return 0, err
809809
}

0 commit comments

Comments
 (0)