def _ExecuteTransaction(self, transaction):
    while True:
      # Connectivity issues and deadlocks should not cause threads to die and
      # create inconsistency.  Any MySQL errors here should be temporary in
      # nature and GRR should be able to recover when the server is available or
      # deadlocks have been resolved.
      connection = self.pool.GetConnection()
      try:
        connection.cursor.execute("START TRANSACTION")
        for query in transaction:
          connection.cursor.execute(query["query"], query["args"])
        connection.cursor.execute("COMMIT")
        results = connection.cursor.fetchall()
        self.pool.PutConnection(connection)
        return results
      except MySQLdb.Error as e:
        # If there was an error attempt to clean up this connection and let it
        # drop
        self.pool.DropConnection(connection)
        if "doesn't exist" in str(e):
          # This should indicate missing tables and raise immediately
          raise e
        else:
          logging.warning("Datastore query retrying after failed with %s.",
                          str(e))
          # Most errors encountered here need a reasonable backoff time to
          # resolve.
          time.sleep(1)
      finally:
        # Reduce the open connection count by calling task_done. This will
        # increment again if the connection is returned to the pool.
        self.pool.connections.task_done()
Return a range of elements from the sorted set at key
dataset/ETHPy150Open google/grr/grr/lib/data_stores/mysql_advanced_data_store.py/MySQLAdvancedDataStore._ExecuteTransaction--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/vendor/txredisapi.py/RedisProtocol.zrange