@Override
  public void putRepairRequests(RepairRequestRecord record) throws SQLException {
    long startTime = time.milliseconds();
    try (Connection connection = dataSource.getConnection()) {
      try (PreparedStatement statement = connection.prepareStatement(INSERT_QUERY)) {
        statement.setBytes(1, Base64.decodeBase64(record.getBlobId()));
        statement.setLong(2, record.getPartitionId());
        statement.setString(3, record.getSourceHostName());
        statement.setInt(4, record.getSourceHostPort());
        statement.setShort(5, (short) record.getOperationType().ordinal());
        statement.setTimestamp(6, new Timestamp(record.getOperationTimeMs()));
        statement.setShort(7, record.getLifeVersion());
        if (record.getExpirationTimeMs() != Utils.Infinite_Time) {
          statement.setTimestamp(8, new Timestamp(record.getExpirationTimeMs()));
        } else {
          statement.setTimestamp(8, null);
        }
        statement.executeUpdate();
      }
      metrics.repairDbPutRequestTimeInMs.update(time.milliseconds() - startTime);
    } catch (SQLException e) {
      metrics.repairDbErrorPutCount.inc();
      logger.error("failed to insert record to {} due to {}", dataSource, e.getMessage());
      throw e;
    }
  }
Insert one {@link RepairRequestRecord}
@param record the record to insert
ambry-mysql/src/main/java/com/github/ambry/repair/MysqlRepairRequestsDb.java