diff options
author | Damien F. Katz <damien@apache.org> | 2009-07-29 21:48:53 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2009-07-29 21:48:53 +0000 |
commit | a05287f49dc20ef83f89668f1d2603174823565e (patch) | |
tree | d1f3fe2dfeea71a8eb26666c9bb56a2b690c4cde /src | |
parent | be2828a00e2eba6be47df5648f4e589a43113dbe (diff) |
Fix for COUCHDB-434. Only reassign previous revid inside the updater process.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@799093 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_db.erl | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl index 4e64846c..aff5b743 100644 --- a/src/couchdb/couch_db.erl +++ b/src/couchdb/couch_db.erl @@ -316,13 +316,7 @@ prep_and_validate_update(Db, #doc{id=Id,revs={RevStart, Revs}}=Doc, [] -> % new doc, and we have existing revs. % reuse existing deleted doc - if OldFullDocInfo#full_doc_info.deleted -> - % existing docs are deletions - #doc_info{revs=[#rev_info{rev={Pos, DelRevId}}|_]} = - couch_doc:to_doc_info(OldFullDocInfo), - Doc2 = Doc#doc{revs={Pos, [DelRevId]}}, - {validate_doc_update(Db, Doc2, fun() -> nil end), Doc2}; - AllowConflict -> + if OldFullDocInfo#full_doc_info.deleted orelse AllowConflict -> {validate_doc_update(Db, Doc, fun() -> nil end), Doc}; true -> {conflict, Doc} |