couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [33/50] couch commit: updated refs/heads/windsor-merge to 6e60cbe
Date Thu, 07 Aug 2014 15:37:55 GMT
Avoid infinite loops in remove_dup_epochs

Oops.


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

Branch: refs/heads/windsor-merge
Commit: 5686e7327c1fa1a039896d0e34567c0ee8125e41
Parents: a9f5c83
Author: Adam Kocoloski <adam@cloudant.com>
Authored: Thu Oct 24 16:51:00 2013 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Aug 6 12:20:08 2014 +0100

----------------------------------------------------------------------
 src/couch_db_header.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/5686e732/src/couch_db_header.erl
----------------------------------------------------------------------
diff --git a/src/couch_db_header.erl b/src/couch_db_header.erl
index b7c93d9..03f95ea 100644
--- a/src/couch_db_header.erl
+++ b/src/couch_db_header.erl
@@ -263,7 +263,7 @@ remove_dup_epochs([_]=Epochs) ->
     Epochs;
 remove_dup_epochs([{N1, S}, {_N2, S}]) ->
     % Seqs match, keep the most recent owner
-    remove_dup_epochs([{N1, S}]);
+    [{N1, S}];
 remove_dup_epochs([_, _]=Epochs) ->
     % Seqs don't match.
     Epochs;
@@ -272,7 +272,7 @@ remove_dup_epochs([{N1, S}, {_N2, S} | Rest]) ->
     remove_dup_epochs([{N1, S} | Rest]);
 remove_dup_epochs([{N1, S1}, {N2, S2} | Rest]) ->
     % Seqs don't match, recurse to check others
-    remove_dup_epochs([{N1, S1} | remove_dup_epochs([{N2, S2} | Rest])]).
+    [{N1, S1} | remove_dup_epochs([{N2, S2} | Rest])].
 
 
 upgrade_compacted_seq(#db_header{}=Header) ->


Mime
View raw message