ostinelli / syn

A scalable global Process Registry and Process Group manager for Erlang and Elixir.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syn rejects some names

essen opened this issue · comments

Syn doesn't accept some names as the following snippet shows, despite saying it accepts any().

Probably related to #3 and actually sounds like the problem was fixed in the past and is back.

2> application:ensure_all_started(syn).
{ok,[mnesia,syn]}
3> syn:join({stream, {server, <<"hello">>}}, self()).
** exception exit: {{aborted,
                        {no_exists,
                            [syn_groups_table,
                             [{{syn_groups_table,'$1','$2','_','_'},
                               [{'==','$1',{{stream,{server,<<"hello">>}}}},
                                {'=:=','$2',<0.96.0>}],
                               ['$_']}]]}},
                    {gen_server,call,
                        [{syn_groups,nonode@nohost},
                         {join,{stream,{server,<<"hello">>}},<0.96.0>,undefined}]}}
     in function  gen_server:call/2 (gen_server.erl, line 204)
4> 
=INFO REPORT==== 6-Apr-2017::10:22:33 ===
Terminating syn_groups with reason: {aborted,
                                     {no_exists,
                                      [syn_groups_table,
                                       [{{syn_groups_table,'$1','$2','_','_'},
                                         [{'==','$1',
                                           {{stream,{server,<<"hello">>}}}},
                                          {'=:=','$2',<0.96.0>}],
                                         ['$_']}]]}}
=ERROR REPORT==== 6-Apr-2017::10:22:33 ===
** Generic server syn_groups terminating 
** Last message in was {join,{stream,{server,<<"hello">>}},<0.96.0>,undefined}
** When Server state == {state,undefined,undefined}
** Reason for termination == 
** {{aborted,{no_exists,[syn_groups_table,
                         [{{syn_groups_table,'$1','$2','_','_'},
                           [{'==','$1',{{stream,{server,<<"hello">>}}}},
                            {'=:=','$2',<0.96.0>}],
                           ['$_']}]]}},
    [{mnesia,abort,1,[{file,"mnesia.erl"},{line,318}]},
     {syn_groups,i_find_by_pid_and_name,2,
                 [{file,"/home/essen/tmp/syn/_build/default/lib/syn/src/syn_groups.erl"},
                  {line,319}]},
     {syn_groups,handle_call,3,
                 [{file,"/home/essen/tmp/syn/_build/default/lib/syn/src/syn_groups.erl"},
                  {line,180}]},
     {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,615}]},
     {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,647}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}

Can confirm, also tuple like {atom(), map()} not working too.

Thanks for your reports. I guess you were referring to #6, the issue there was that the match guard function is different for tuples in mnesia:dirty_select/2 (see here).

Will get to it.

Yes, #6, sorry.

Before I get to this, do you happen to know why the match guard function is different for tuples, and if this has changed in Erlang 19.3?

I have no idea. And for the record, I was using 19.2.

Thanks! We will try it soon and report back.

I will release it to hex as 1.6.1 asa Travis is green too.

1.6.1 has been released.