anchor.diff:  %% session doc.
   %% @end
   %%--------------------------------------------------------------------
  --spec maybe_clear_session_record(session:record()) ->
  -    {ok, session:record()} | {error, update_not_needed}.
  +-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
                   {_, []} ->
  -                    {error, update_not_needed};
  +                    {ok, Sess};
                   {AliveCons, _DeadCons} ->
                       {ok, Sess#session{connections = AliveCons}}
               end;
  
positive.code:             {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} ->
  
negative.code:             {ok, SessId};
          {ok, #document{key = SessId}} ->
              {ok, SessId};
          {error, _Reason} = Error ->
              Error
      end.
  