You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by be...@apache.org on 2014/02/10 21:05:03 UTC

[03/50] couch commit: updated refs/remotes/origin/import to 09c6556

Disable validation for internal replication


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

Branch: refs/remotes/origin/import
Commit: 5718463e74f745a64ae83266a1ddf4051c1f6275
Parents: ee7998d
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Oct 25 00:41:17 2012 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Feb 4 17:03:23 2014 -0600

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/5718463e/src/couch_db.erl
----------------------------------------------------------------------
diff --git a/src/couch_db.erl b/src/couch_db.erl
index 3707108..2253e62 100644
--- a/src/couch_db.erl
+++ b/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),