anchor.diff:              {ok, SessId};
           {ok, #document{key = SessId}} ->
               {ok, SessId};
  -        {error, update_not_needed} ->
  -            {ok, SessId};
           {error, not_found} ->
               case start_session(#document{key = SessId, value = Sess}) of
                   {error, already_exists} ->
  
positive.code:             {ok, SessId};
          {ok, #document{key = SessId}} ->
              {ok, SessId};
          {error, update_not_needed} ->
              {ok, SessId};
          {error, _Reason} = Error ->
              Error
      end.
  
negative.code: %% session doc.
  %% @end
  %%--------------------------------------------------------------------
  -spec maybe_clear_session_record(session:record()) -> {ok, session:record()}.
  maybe_clear_session_record(#session{supervisor = Sup, connections = Cons} = Sess) ->
      case is_alive(Sup) of
          true ->
              case lists:partition(fun is_alive/1, Cons) of
                  {_, []} ->
                      {ok, Sess};
                  {AliveCons, _DeadCons} ->
                      {ok, Sess#session{connections = AliveCons}}
              end;
  