You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2012/01/03 21:06:28 UTC
[1/2] git commit: COUCHDB-1258 - Checkpoint views less often
Updated Branches:
refs/heads/1.1.x 3e24328fe -> 987192827
refs/heads/1.2.x 6d6400c37 -> 0aa0c2ae1
COUCHDB-1258 - Checkpoint views less often
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0aa0c2ae
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0aa0c2ae
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0aa0c2ae
Branch: refs/heads/1.2.x
Commit: 0aa0c2ae17794eed7a1efcc5b6f95e18732721cc
Parents: 6d6400c
Author: Robert Newson <rn...@apache.org>
Authored: Tue Jan 3 18:26:04 2012 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Jan 3 19:53:46 2012 +0000
----------------------------------------------------------------------
src/couchdb/couch_view_group.erl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0aa0c2ae/src/couchdb/couch_view_group.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_view_group.erl b/src/couchdb/couch_view_group.erl
index d65964e..769a69e 100644
--- a/src/couchdb/couch_view_group.erl
+++ b/src/couchdb/couch_view_group.erl
@@ -247,7 +247,9 @@ handle_cast({partial_update, Pid, NewGroup}, #group_state{updater_pid=Pid}
group = Group
} = State,
NewSeq = NewGroup#group.current_seq,
- case NewSeq > Group#group.current_seq of
+ CheckpointInterval = list_to_integer(
+ couch_config:get("couchdb","view_checkpoint_interval","100")),
+ case NewSeq > CheckpointInterval + Group#group.current_seq of
true ->
?LOG_INFO("checkpointing view update at seq ~p for ~s ~s", [NewSeq,
DbName, NewGroup#group.name]),