The changes feed goes from time to time in an infinite loop using the since parameter with the last sequence when one node is missing.
DbName = <<"testdb">>,
Since = <<"last sequence of the feed">>,
fabric:changes(DbName, fun
({change, Change}, Acc) ->
twig:log(info, "got change ~p", [Change]),
{ok, Acc};
({stop, EndSeq}, _Acc) ->
twig:log(info, "got last seq ~p", [EndSeq]),
{ok, Acc};
(timeout, Acc) ->
twig:log(info, "got timeout", []),
{ok, Acc};
(Other, Acc) ->
twig:log(info, "other msg", [Other]),
{ok, Acc}
end,
undefined,
#changes_args{
include_docs = true,
feed = "normal",
since = Since,
filter = main_only,
timeout = infinity,
db_open_options = []
}
)
Then retry from last seq with the first node closed. It will goes in an infinite loop getting a timeout.
The changes feed goes from time to time in an infinite loop using the since parameter with the last sequence when one node is missing.
How to reproduce:
Using the 3 dev modes, get changes using this code:
Then retry from last seq with the first node closed. It will goes in an infinite loop getting a timeout.