anchor.diff:      %% select
       mnesia:dirty_select(syn_registry_table, [{MatchHead, [Guard], [ProcessInfoFormat]}]).
   
  --spec write_processes_info_to_node(Node :: atom(), ProcessesInfo :: list()) -> ok.
  -write_processes_info_to_node(Node, ProcessesInfo) ->
  +-spec write_registry_processes_info_to_node(Node :: atom(), RegistryProcessesInfo :: list()) -> ok.
  +write_registry_processes_info_to_node(Node, RegistryProcessesInfo) ->
       FWrite = fun({Key, ProcessPid, ProcessMeta}) ->
           mnesia:dirty_write(#syn_registry_table{
               key = Key,
  
positive.code:             meta = ProcessMeta
          })
      end,
      lists:foreach(FWrite, ProcessesInfo).
  
  -spec purge_double_processes(
      ConflictingProcessCallbackModule :: atom(),
      ConflictingProcessCallbackFunction :: atom(),
      DoubleProcessesInfo :: list()
  ) -> ok.
  purge_double_processes(undefined, _, DoubleProcessesInfo) ->
      F = fun({Key, LocalProcessPid, _LocalProcessMeta}) ->
          error_logger:warning_msg("Found a double process for ~s, killing it on local node ~p", [Key, node()]),
          exit(LocalProcessPid, kill)
      end,
      lists:foreach(F, DoubleProcessesInfo);
  purge_double_processes(ConflictingProcessCallbackModule, ConflictingProcessCallbackFunction, DoubleProcessesInfo) ->
      F = fun({Key, LocalProcessPid, LocalProcessMeta}) ->
          spawn(
              fun() ->
                  error_logger:warning_msg("Found a double process for ~s, about to trigger callback on local node ~p", [Key, node()]),
                  ConflictingProcessCallbackModule:ConflictingProcessCallbackFunction(Key, LocalProcessPid, LocalProcessMeta)
              end)
      end,
      lists:foreach(F, DoubleProcessesInfo).
  
  -spec stitch_group_tab(RemoteNode :: atom()) -> ok.
  stitch_group_tab(RemoteNode) ->
      %% get remote processes info
      RemoteGroupsInfo = rpc:call(RemoteNode, ?MODULE, get_groups_info_of_node, [RemoteNode]),
      %% get local processes info
      LocalGroupsInfo = get_groups_info_of_node(node()),
      %% write
      write_remote_groups_to_local(RemoteNode, RemoteGroupsInfo),
      write_local_groups_to_remote(RemoteNode, LocalGroupsInfo).
  
  -spec get_groups_info_of_node(Node :: atom()) -> list().
  get_groups_info_of_node(Node) ->
      %% build match specs
      MatchHead = #syn_groups_table{name = '$1', pid = '$2', node = '$3'},
      Guard = {'=:=', '$3', Node},
  
negative.code:     %% ignore mnesia event
      {noreply, State};
  
  handle_info({purge_registry_double_processes, DoubleRegistryProcessesInfo}, #state{
      registry_conflicting_process_callback_module = RegistryConflictingProcessCallbackModule,
      registry_conflicting_process_callback_function = RegistryConflictingProcessCallbackFunction
  } = State) ->
      error_logger:warning_msg("About to purge double processes after netsplit"),
      purge_registry_double_processes(RegistryConflictingProcessCallbackModule, RegistryConflictingProcessCallbackFunction, DoubleRegistryProcessesInfo),
      {noreply, State};
  
  handle_info(Info, State) ->
  