Skip to content
This repository was archived by the owner on Sep 19, 2019. It is now read-only.
This repository was archived by the owner on Sep 19, 2019. It is now read-only.

changes feed goes in infinite loop #14

@benoitc

Description

@benoitc

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions