Repository: couchdb-fabric Updated Branches: refs/heads/master 4c94f3095 -> d67049cca
Add owner of shard to last_seq of changes response Prior to this commit, there was a bug where the response of a changes query would include epoch information for every change, but not for the last sequence. Subsequent shard changes queries would rewind from zero if the last_seq field was used in the clustered changes query and any shard had previously been moved. Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/d67049cc Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/d67049cc Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/d67049cc Branch: refs/heads/master Commit: d67049cca5bba6fbe484f3b55356d238ab44515b Parents: 4c94f30 Author: Benjamin Bastian <[email protected]> Authored: Tue Jan 19 16:29:34 2016 -0800 Committer: Benjamin Bastian <[email protected]> Committed: Thu Jan 21 11:15:35 2016 -0800 ---------------------------------------------------------------------- src/fabric_rpc.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d67049cc/src/fabric_rpc.erl ---------------------------------------------------------------------- diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl index 057dec3..2554f91 100644 --- a/src/fabric_rpc.erl +++ b/src/fabric_rpc.erl @@ -63,10 +63,10 @@ changes(DbName, Options, StartVector, DbOptions) -> epochs = get_epochs(Db) }, try - {ok, #cacc{seq=LastSeq, pending=Pending}} = + {ok, #cacc{seq=LastSeq, pending=Pending, epochs=Epochs}} = couch_db:changes_since(Db, StartSeq, Enum, Opts, Acc0), rexi:stream_last({complete, [ - {seq, {LastSeq, uuid(Db)}}, + {seq, {LastSeq, uuid(Db), owner_of(LastSeq, Epochs)}}, {pending, Pending} ]}) after
