diff --git a/0051-fix-the-archive-error.patch b/0051-fix-the-archive-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..2cf8fb1c70fd537a2ac4944be74a9bf5ff699628 --- /dev/null +++ b/0051-fix-the-archive-error.patch @@ -0,0 +1,88 @@ +From 847baaa8c86b83b064b039146ed9e961c3f63cab Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Tue, 18 Jun 2024 13:23:30 +0800 +Subject: [PATCH] fix the archive error + +--- + .../accounting_storage/pgsql/as_pgsql_archive.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/plugins/accounting_storage/pgsql/as_pgsql_archive.c b/src/plugins/accounting_storage/pgsql/as_pgsql_archive.c +index c8738f3..1a5f55a 100755 +--- a/src/plugins/accounting_storage/pgsql/as_pgsql_archive.c ++++ b/src/plugins/accounting_storage/pgsql/as_pgsql_archive.c +@@ -4360,7 +4360,7 @@ static int _archive_purge_table(purge_type_t purge_type, uint32_t usage_info, + "DELETE FROM \"%s_%s\" " + "WHERE (node_name, time_start) IN " + "( SELECT node_name, time_start FROM \"%s_%s\" " +- "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d", ++ "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d )", + cluster_name, sql_table, cluster_name, sql_table, col_name, + tmp_end, col_name, MAX_PURGE_LIMIT); + break; +@@ -4369,7 +4369,7 @@ static int _archive_purge_table(purge_type_t purge_type, uint32_t usage_info, + "DELETE FROM \"%s_%s\" " + "WHERE (job_db_inx, time_start) IN " + "( SELECT job_db_inx, time_start FROM \"%s_%s\" " +- "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d", ++ "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d )", + cluster_name, sql_table, cluster_name, sql_table, col_name, + tmp_end, col_name, MAX_PURGE_LIMIT); + break; +@@ -4378,7 +4378,7 @@ static int _archive_purge_table(purge_type_t purge_type, uint32_t usage_info, + "DELETE FROM \"%s_%s\" " + "WHERE (id_resv, time_start) IN " + "( SELECT id_resv, time_start FROM \"%s_%s\" " +- "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d", ++ "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d )", + cluster_name, sql_table, cluster_name, sql_table, col_name, + tmp_end, col_name, MAX_PURGE_LIMIT); + break; +@@ -4387,7 +4387,7 @@ static int _archive_purge_table(purge_type_t purge_type, uint32_t usage_info, + "DELETE FROM \"%s_%s\" " + "WHERE (job_db_inx) IN " + "( SELECT job_db_inx FROM \"%s_%s\" " +- "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d", ++ "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d )", + cluster_name, sql_table, cluster_name, sql_table, col_name, + tmp_end, col_name, MAX_PURGE_LIMIT); + break; +@@ -4396,7 +4396,7 @@ static int _archive_purge_table(purge_type_t purge_type, uint32_t usage_info, + "DELETE FROM \"%s_%s\" " + "WHERE (job_db_inx, id_step, step_het_comp) IN " + "( SELECT job_db_inx, id_step, step_het_comp FROM \"%s_%s\" " +- "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d", ++ "WHERE %s <= %ld AND time_end != 0 ORDER BY %s asc LIMIT %d )", + cluster_name, sql_table, cluster_name, sql_table, col_name, + tmp_end, col_name, MAX_PURGE_LIMIT); + break; +@@ -4405,7 +4405,7 @@ static int _archive_purge_table(purge_type_t purge_type, uint32_t usage_info, + "DELETE FROM \"%s\" " + "WHERE (id) IN " + "( SELECT id FROM \"%s\" " +- "WHERE %s <= %ld AND cluster='%s' ORDER BY %s asc LIMIT %d", ++ "WHERE %s <= %ld AND cluster='%s' ORDER BY %s asc LIMIT %d )", + sql_table, sql_table, col_name, + tmp_end, cluster_name, col_name, MAX_PURGE_LIMIT); + break; +@@ -4414,7 +4414,7 @@ static int _archive_purge_table(purge_type_t purge_type, uint32_t usage_info, + "DELETE FROM \"%s_%s\" " + "WHERE (id, id_tres, time_start) IN " + "( SELECT id, id_tres, time_start FROM \"%s_%s\" " +- "WHERE %s <= %ld ORDER BY %s asc LIMIT %d", ++ "WHERE %s <= %ld ORDER BY %s asc LIMIT %d )", + cluster_name, sql_table, cluster_name, sql_table, col_name, + tmp_end, col_name, MAX_PURGE_LIMIT); + break; +@@ -4423,7 +4423,7 @@ static int _archive_purge_table(purge_type_t purge_type, uint32_t usage_info, + "DELETE FROM \"%s_%s\" " + "WHERE (id_tres, time_start) IN " + "( SELECT id_tres, time_start FROM \"%s_%s\" " +- "WHERE %s <= %ld ORDER BY %s asc LIMIT %d", ++ "WHERE %s <= %ld ORDER BY %s asc LIMIT %d )", + cluster_name, sql_table, cluster_name, sql_table, col_name, + tmp_end, col_name, MAX_PURGE_LIMIT); + break; +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index 908f4379baaf4d3a3c7f4f101dc6b5d8d74b8028..c0849062edaa890f204a33f62364a6ea2636e2f4 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 53 +%define rel 54 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -66,6 +66,7 @@ Patch47: 0047-rename-_get_result_by_index.patch Patch48: 0048-fix-sacct-not-showing-job-information.patch Patch49: 0049-fix-the-preempt-error.patch Patch50: 0050-enable-col_data-empty-check.patch +Patch51: 0051-fix-the-archive-error.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -758,6 +759,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Tue Jun 18 2024 Xing Liu - 21.08.8-54 +- fix the archive error + * Mon Jun 17 2024 Xing Liu - 21.08.8-53 - enable col_data empty check