From be9b1debe64689b6086af11a42872768f7e66c7c Mon Sep 17 00:00:00 2001 From: motodiary Date: Mon, 3 Jun 2024 15:44:27 +0800 Subject: [PATCH] Remove redundant SQL statements in adding tres --- ...undant-SQL-statements-in-adding-tres.patch | 24 +++++++++++++++++++ slurm.spec | 6 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 0040-Remove-redundant-SQL-statements-in-adding-tres.patch diff --git a/0040-Remove-redundant-SQL-statements-in-adding-tres.patch b/0040-Remove-redundant-SQL-statements-in-adding-tres.patch new file mode 100644 index 0000000..5d98c20 --- /dev/null +++ b/0040-Remove-redundant-SQL-statements-in-adding-tres.patch @@ -0,0 +1,24 @@ +From b013e7d904a499bed43966118b555b0012a54062 Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Mon, 3 Jun 2024 15:40:22 +0800 +Subject: [PATCH] Remove redundant SQL statements in adding tres + +--- + src/plugins/accounting_storage/pgsql/accounting_storage_pgsql.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/plugins/accounting_storage/pgsql/accounting_storage_pgsql.c b/src/plugins/accounting_storage/pgsql/accounting_storage_pgsql.c +index c3b5af6..3f22fde 100755 +--- a/src/plugins/accounting_storage/pgsql/accounting_storage_pgsql.c ++++ b/src/plugins/accounting_storage/pgsql/accounting_storage_pgsql.c +@@ -785,7 +785,6 @@ static int _as_pgsql_acct_check_tables(pgsql_conn_t *pgsql_conn) + ending = xstrdup_printf(", primary key (id)); CREATE UNIQUE INDEX IF NOT EXISTS %s_udx ON %s " + "(\"type\", \"name\");", tres_table, tres_table); + xstrfmtcat(ending, "CREATE SEQUENCE IF NOT EXISTS %s_id_seq MINVALUE 1001 START WITH 1001;" +- "ALTER SEQUENCE %s_id_seq RESTART WITH 1001;" + "ALTER TABLE %s ALTER COLUMN id SET DEFAULT nextval('%s_id_seq'::regclass);", + tres_table, tres_table, tres_table, tres_table); + +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index 6b60d8f..7620852 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 42 +%define rel 43 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -55,6 +55,7 @@ Patch36: 0036-fix-the-DefaultWCKey-not-working.patch Patch37: 0037-fix-adding-tres-resource-failure.patch Patch38: 0038-fix-querying-the-user-binding-qos.patch Patch39: 0039-fix-association-GrpTRES-get_parent_limits-errors.patch +Patch40: 0040-Remove-redundant-SQL-statements-in-adding-tres.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -747,6 +748,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Mon Jun 03 2024 Xing Liu - 21.08.8-43 +- Remove redundant SQL statements in adding tres + * Mon Jun 03 2024 Xing Liu - 21.08.8-42 - fix association,GrpTRES,get_parent_limits errors -- Gitee