You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2020/02/19 15:05:14 UTC

[couchdb] branch fdb-mango-indexes updated: add back incr_stats

This is an automated email from the ASF dual-hosted git repository.

garren pushed a commit to branch fdb-mango-indexes
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/fdb-mango-indexes by this push:
     new c2c28ae  add back incr_stats
c2c28ae is described below

commit c2c28ae2f4c45d58dd4793835688e4b8c29584fe
Author: Garren Smith <ga...@gmail.com>
AuthorDate: Wed Feb 19 17:04:34 2020 +0200

    add back incr_stats
---
 src/fabric/src/fabric2_fdb.erl | 2 +-
 src/mango/src/mango_jobs.erl   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/fabric/src/fabric2_fdb.erl b/src/fabric/src/fabric2_fdb.erl
index f38894a..8aa7e85 100644
--- a/src/fabric/src/fabric2_fdb.erl
+++ b/src/fabric/src/fabric2_fdb.erl
@@ -813,7 +813,7 @@ write_doc(#{} = Db0, Doc, NewWinner0, OldWinner, ToUpdate, ToRemove) ->
     % Update database size
     AddSize = sum_add_rev_sizes([NewWinner | ToUpdate]),
     RemSize = sum_rem_rev_sizes(ToRemove),
-%%    incr_stat(Db, <<"sizes">>, <<"external">>, AddSize - RemSize),
+    incr_stat(Db, <<"sizes">>, <<"external">>, AddSize - RemSize),
 
     ok.
 
diff --git a/src/mango/src/mango_jobs.erl b/src/mango/src/mango_jobs.erl
index fd83254..3197f14 100644
--- a/src/mango/src/mango_jobs.erl
+++ b/src/mango/src/mango_jobs.erl
@@ -31,7 +31,7 @@ build_index(TxDb, #idx{} = Idx) ->
 
     JobId = job_id(TxDb, Idx),
     JobData = job_data(TxDb, Idx),
-    ok = couch_jobs:add(undefined, ?MANGO_INDEX_JOB_TYPE, JobId, JobData),
+    ok = couch_jobs:add(TxDb, ?MANGO_INDEX_JOB_TYPE, JobId, JobData),
     {ok, JobId}.