Fix passing epoch in correctly with rep_db_checkpoint message.
This bug was hidden previously because this code never ran due to
another bug in handling the stop callback message from change feed.
Jira: COUCHDB-3104
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index cb38133..eed72b8 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -389,7 +389,7 @@
end,
{Server, DbName, Epoch};
changes_reader_cb({stop, EndSeq}, _, {Server, DbName, Epoch}) ->
- Msg = {rep_db_checkpoint, DbName, EndSeq},
+ Msg = {rep_db_checkpoint, DbName, EndSeq, Epoch},
ok = gen_server:call(Server, Msg, infinity),
{Server, DbName, Epoch};
changes_reader_cb(_, _, Acc) ->