You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2019/04/11 16:15:13 UTC

[couchdb] branch fix-upgrade-clause-in-mem3_rpc created (now adf0424)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch fix-upgrade-clause-in-mem3_rpc
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at adf0424  Fix upgrade clause for mem3_rpc:load_checkpoint/4,5

This branch includes the following new commits:

     new adf0424  Fix upgrade clause for mem3_rpc:load_checkpoint/4,5

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb] 01/01: Fix upgrade clause for mem3_rpc:load_checkpoint/4, 5

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch fix-upgrade-clause-in-mem3_rpc
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit adf04243ea3fed9a513997c6e9764305cc25655b
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Thu Apr 11 12:10:40 2019 -0400

    Fix upgrade clause for mem3_rpc:load_checkpoint/4,5
    
    When upgrading, the new mem3_rpc:load_checkpoint with a filter hash arg won't
    be available on older nodes.
    
    Filter hashes are not currently used anyway, so to avoid crashes on mixed
    cluster call the older version without the filter hash part when the filter has
    the default <<>> value.
---
 src/mem3/src/mem3_rpc.erl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/mem3/src/mem3_rpc.erl b/src/mem3/src/mem3_rpc.erl
index 59dbbe8..0991aa7 100644
--- a/src/mem3/src/mem3_rpc.erl
+++ b/src/mem3/src/mem3_rpc.erl
@@ -68,7 +68,11 @@ get_missing_revs(Node, DbName, IdsRevs, Options) ->
 update_docs(Node, DbName, Docs, Options) ->
     rexi_call(Node, {fabric_rpc, update_docs, [DbName, Docs, Options]}).
 
-
+load_checkpoint(Node, DbName, SourceNode, SourceUUID, <<>>) ->
+    % Upgrade clause for a mixed cluster for old nodes that don't have
+    % load_checkpoint_rpc/4 yet. FilterHash is currently not
+    % used and so defaults to <<>> everywhere
+    load_checkpoint(Node, DbName, SourceNode, SourceUUID);
 load_checkpoint(Node, DbName, SourceNode, SourceUUID, FilterHash) ->
     Args = [DbName, SourceNode, SourceUUID, FilterHash],
     rexi_call(Node, {mem3_rpc, load_checkpoint_rpc, Args}).