anchor.diff:      %% running at the failed node and also simply remove all
       %% queue'd requests back to the failed node
   
  -    AllTids0 = ?ets_match(mnesia_tid_locks, {{'$1', '_', '_'}}),
  +    AllTids0 = ?ets_match(mnesia_tid_locks, ?match_oid_held_locks('$1')),
       AllTids  = lists:usort(AllTids0),
       Tids = [T || [T] <- AllTids, Node == node(T#tid.pid), not lists:member(T, Pending)],
       do_release_tids(Tids).
  
positive.code: 
  try_lock(Tid, Op, SimpleOp, Lock, Pid, Oid) ->
      case can_lock(Tid, Lock, Oid, {no, bad_luck}) of
  	{yes, Default} ->
  	    Reply = grant_lock(Tid, SimpleOp, Lock, Oid, Default),
  	    reply(Pid, Reply);
  	{{no, Lucky},_} ->
  	    C = #cyclic{op = SimpleOp, lock = Lock, oid = Oid, lucky = Lucky},
  	    ?dbg("Rejected ~p ~p ~p ~p ~n", [Tid, Oid, Lock, Lucky]),
  	    reply(Pid, {not_granted, C});
  	{{queue, Lucky},_} ->
  	    ?dbg("Queued ~p ~p ~p ~p ~n", [Tid, Oid, Lock, Lucky]),
  	    %% Append to queue: Nice place for trace output
  	    ?ets_insert(mnesia_lock_queue,
  
negative.code: check_lock(Tid, Oid, [], TabLocks, X, AlreadyQ, Type) ->
      check_lock(Tid, Oid, TabLocks, [], X, AlreadyQ, Type).
  
  can_queue(Tid, Tid, _Oid, Res) ->
      Res;
  can_queue(WaitForTid, Tid, Oid = {Tab, _}, _) ->
      case allowed_to_be_queued(WaitForTid,Tid) of
  	true when Tid#tid.pid == WaitForTid#tid.pid ->
  	    dbg_out("Spurious lock conflict ~w: ~w -> ~w~n",
  		    [Oid, Tid, WaitForTid]),
  	    HaveQ = (ets:lookup(mnesia_lock_queue, Oid) /= [])
  		orelse (ets:lookup(mnesia_lock_queue,{Tab,?ALL}) /= []),
  	    case HaveQ of
  		true  -> {no, WaitForTid};
  		false -> {queue, WaitForTid}
  	    end;
  	true ->
  	    {queue, WaitForTid};
  	false ->
  	    {no, WaitForTid}
      end.
  
  %% True if  WaitForTid > Tid -> % Important order
  allowed_to_be_queued(WaitForTid, Tid) ->
  