def clean_journal_entries(self, txn_id, key):
    if txn_id == 0:
      return True
    start_row = datastore_server.DatastoreDistributed.get_journal_key(key, 0)
    end_row = datastore_server.DatastoreDistributed.get_journal_key(key,
      int(txn_id) - 1)
    last_key = start_row

    keys_to_delete = []
    while True:
      try:
        results = self.db_access.range_query(dbconstants.JOURNAL_TABLE,
          dbconstants.JOURNAL_SCHEMA, last_key, end_row, self.BATCH_SIZE,
          start_inclusive=False, end_inclusive=True)
        if len(results) == 0:
          return True
        keys_to_delete = []
        for item in results:
          keys_to_delete.append(item.keys()[0])
        self.db_access.batch_delete(dbconstants.JOURNAL_TABLE,
            keys_to_delete)
        self.journal_entries_cleaned += len(keys_to_delete)
      except dbconstants.AppScaleDBConnectionError, db_error:
        logging.error("Error hard deleting keys {0} --> {1}".format(
          keys_to_delete, db_error))
        logging.error("Backing off!")
        time.sleep(self.DB_ERROR_PERIOD)
        return False
      except Exception, exception:
        logging.error("Caught unexcepted exception {0}".format(exception))
        logging.error("Backing off!")
        time.sleep(self.DB_ERROR_PERIOD)
        return False
Register names for later record call from `driver`.
dataset/ETHPy150Open AppScale/appscale/AppDB/groomer.py/DatastoreGroomer.clean_journal_entries--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/casehandlers/caseset.py/CaseArray.register