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 2013/06/29 17:17:46 UTC

[05/50] [abbrv] git commit: updated refs/heads/1843-feature-bigcouch to cba2e81

Disable validation for internal replication


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/4175d066
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/4175d066
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/4175d066

Branch: refs/heads/1843-feature-bigcouch
Commit: 4175d066a827a64df96d46a03976ba627146adc5
Parents: de41ca7
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Oct 25 00:41:17 2012 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Mar 20 06:02:50 2013 -0500

----------------------------------------------------------------------
 src/couch/src/couch_db.erl | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/4175d066/src/couch/src/couch_db.erl
----------------------------------------------------------------------
diff --git a/src/couch/src/couch_db.erl b/src/couch/src/couch_db.erl
index 3707108..2253e62 100644
--- a/src/couch/src/couch_db.erl
+++ b/src/couch/src/couch_db.erl
@@ -512,6 +512,14 @@ validate_doc_update(#db{validate_doc_funs=[]}, _Doc, _GetDiskDocFun) ->
 validate_doc_update(_Db, #doc{id= <<"_local/",_/binary>>}, _GetDiskDocFun) ->
     ok;
 validate_doc_update(Db, Doc, GetDiskDocFun) ->
+    case get(io_priority) of
+        {internal_repl, _} ->
+            ok;
+        _ ->
+            validate_doc_update_int(Db, Doc, GetDiskDocFun)
+    end.
+
+validate_doc_update_int(Db, Doc, GetDiskDocFun) ->
     DiskDoc = GetDiskDocFun(),
     JsonCtx = couch_util:json_user_ctx(Db),
     SecObj = get_security(Db),