kagkarlsson / db-scheduler

Persistent cluster-friendly scheduler for Java
Apache License 2.0
1.23k stars 188 forks source link

setTaskData not called #452

Closed m7yJpNXY closed 3 months ago

m7yJpNXY commented 8 months ago

jdbcCustomization.setTaskData is called in JdbcTaskRepository::createIfNotExists but not in JdbcTaskRepository::replace or JdbcTaskRepository::rescheduleInternal. Shouldn´t it be called for the latter two as well?

kagkarlsson commented 8 months ago

I believe you are correct, yes. Good catch! Currently there are only one implementation of that in db-scheduler, but if anyone tries to override the way data is stored in the table, there will be trouble..

Current only implementation:

  @Override
  public void setTaskData(PreparedStatement p, int index, byte[] value) throws SQLException {
    p.setObject(index, value);
  }
kagkarlsson commented 3 months ago

🎉 This issue has been resolved in v14.0.1 (Release Notes)