def tick
      deleted = nil
      @to_delete.each do |tuple|
        k = get_key_vals(tuple)
        k_str = MessagePack.pack(k)
        cols_str = @dbm[k_str]
        unless cols_str.nil?
          db_cols = MessagePack.unpack(cols_str)
          delete_cols = val_cols.map{|c| tuple[cols.index(c)]}
          if db_cols == delete_cols
            deleted ||= @dbm.delete k_str
          end
        end
      end
      @to_delete = []

      @invalidated = !deleted.nil?
      unless @pending.empty?
        @delta = @pending
        @pending = {}
      end
      flush
    end
def tick
      deleted = nil
      @to_delete.each do |tuple|
        k = get_key_vals(tuple)
        k_str = MessagePack.pack(k)
        cols_str = @dbm[k_str]
        unless cols_str.nil?
          db_cols = MessagePack.unpack(cols_str)
          delete_cols = val_cols.map{|c| tuple[cols.index(c)]}
          if db_cols == delete_cols
            deleted ||= @dbm.delete k_str
          end
        end
      end
      @to_delete = []

      @invalidated = !deleted.nil?
      unless @pending.empty?
        @delta = @pending
        @pending = {}
      end
      flush
    end
Remove to_delete and then move pending => delta.