anchor.diff:      
       {DB4, _Status} = ?TEST_DB:delete(DB3, Key),
       check_changes(DB4, ChangesInterval, "delete_1"),
  -    check_key_in_deleted(DB4, ChangesInterval, Key, Old, "delete_2"),
  +    check_key_in_deleted_no_locks(DB4, ChangesInterval, Key, Old, "delete_2"),
       
       DB5 = check_stop_record_changes(DB4, ChangesInterval, "delete_3"),
   
  
positive.code: %% @doc Checks that a key is present exactly once in the list of deleted
  %%      keys returned by ?TEST_DB:get_changes/1 if no lock is set on a
  %%      previously existing entry.
  -spec check_key_in_deleted(
          DB::?TEST_DB:db(), ChangesInterval::intervals:interval(), Key::?RT:key(),
          {OldExists::boolean(), OldEntry::db_entry:entry()}, Note::string()) -> true.
  check_key_in_deleted(DB, ChangesInterval, Key, {OldExists, OldEntry}, Note) ->
      case intervals:in(Key, ChangesInterval) andalso OldExists andalso
               (db_entry:get_writelock(OldEntry) =:= false andalso
                    db_entry:get_readlock(OldEntry) =:= 0) of
          true ->
              {_ChangedEntries, DeletedKeys} = ?TEST_DB:get_changes(DB),
              case length([K || K <- DeletedKeys, K =:= Key]) of
                  1 -> true;
                  _ -> ?ct_fail("element(2, ?TEST_DB:get_changes(DB)) evaluated "
                                "to \"~w\" and did not contain 1x key ~w~n(~s)~n",
                                [DeletedKeys, Key, lists:flatten(Note)])
              end;
          _    -> true
      end.
  
  
negative.code:         _    -> ok
      end.
  
  %% @doc Checks that an entry is present exactly once in the list of changed
  %%      entries returned by ?TEST_DB:get_changes/1.
  -spec check_entry_in_changes(
          DB::?TEST_DB:db(), ChangesInterval::intervals:interval(), Entry::db_entry:entry(),
          {OldExists::boolean(), OldEntry::db_entry:entry()}, Note::string()) -> ok.
  check_entry_in_changes(DB, ChangesInterval, NewEntry, {OldExists, OldEntry}, Note) ->
      {ChangedEntries, DeletedKeys} = ?TEST_DB:get_changes(DB),
      case db_entry:is_null(NewEntry) of
          true ->
              check_key_in_deleted_internal(DeletedKeys, ChangesInterval, db_entry:get_key(NewEntry), OldExists, Note);
          _ ->
              check_entry_in_changed_entries_internal(ChangedEntries, ChangesInterval, NewEntry, OldEntry, Note)
      end.
  