couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [26/50] git commit: Disable validation for internal replication
Date Sat, 18 Jan 2014 00:47:51 GMT
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/e3ee94c6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/e3ee94c6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/e3ee94c6

Branch: refs/heads/import
Commit: e3ee94c605bf120c8d6ca5851ddbac7ce2c4a949
Parents: 104418b
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Thu Oct 25 00:41:17 2012 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Fri Jan 17 16:44:30 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/e3ee94c6/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),


Mime
View raw message