Skip to content

Commit

Permalink
MSEARCH-794: fix status setting query
Browse files Browse the repository at this point in the history
  • Loading branch information
mukhiddin-yusuf committed Aug 16, 2024
1 parent 55e19af commit 9477a74
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ public void setReindexMergeFailed(List<ReindexEntityType> entityTypes) {
.collect(Collectors.joining(","));
var fullTableName = getFullTableName(context, REINDEX_STATUS_TABLE);
var sql = UPDATE_FOR_ENTITIES_SQL.formatted(
fullTableName, "%s = '?', %s = ?".formatted(STATUS_COLUMN, END_TIME_MERGE_COLUMN));
fullTableName, "%s = ?, %s = ?".formatted(STATUS_COLUMN, END_TIME_MERGE_COLUMN));

log.info("inTypes: {}", inTypes);
log.info("sql: {}", sql);
jdbcTemplate.update(sql, ReindexStatus.MERGE_FAILED.name(), Timestamp.from(Instant.now()), inTypes);
var status = "'%s'".formatted(ReindexStatus.MERGE_FAILED.name());
jdbcTemplate.update(sql, status, Timestamp.from(Instant.now()), inTypes);
}

public void saveReindexStatusRecords(List<ReindexStatusEntity> statusRecords) {
Expand Down

0 comments on commit 9477a74

Please sign in to comment.