anchor.diff:      NewId = ets:update_counter(OpsCache, Key,
   			       {3,1}),
       Length = ets:lookup_element(OpsCache, Key, 2),
  -    %% {Length,OpsDict,NewId} = case ets:lookup(OpsCache, Key) of
  -    %% 				 []->
  -    %% 				     {0,[],1};
  -    %% 				 [{_, {Len,[{PrevId,First}|Rest]}}]->
  -    %% 				     {Len,[{PrevId,First}|Rest],PrevId+1}
  -    %% 		       end,
       case (Length)>=?OPS_THRESHOLD of
           true ->
               Type=DownstreamOp#clocksi_payload.type,
  
positive.code: 		    [Tuple] ->
  			[Key,Length1,_OpId|AllOps] = tuple_to_list(Tuple),
  			{Length1, sub_reverse(AllOps,Length1,[]), LatestSnapshot1, SnapshotCommitTime1, IsFirst1}
  			%% [{_, {Length1,Ops1}}] ->
  			%% 	{Length1,Ops1,LatestSnapshot1,SnapshotCommitTime1,IsFirst1}
  		end
  	end,
      case Length of
  
negative.code: 	    %% Have to get the new ops dict because the interal_read can change it
  	    Length1 = ets:lookup_element(OpsCache, Key, 2),
  	    true = ets:update_element(OpsCache, Key, [{Length1+4,{NewId,DownstreamOp}}, {2,Length1+1}]);
          false ->
  	    true = ets:update_element(OpsCache, Key, [{Length + 4, {NewId,DownstreamOp}}, {2,Length+1}])
      end.
  
  
  