From b5ddbe99c65dd00ffd935cd71cd92cad4ed7f4f5 Mon Sep 17 00:00:00 2001 From: motodiary Date: Thu, 16 May 2024 14:10:06 +0800 Subject: [PATCH] resume 'autocommit off' option Signed-off-by: motodiary --- 0016-resume-autocommit-off-option.patch | 25 +++++++++++++++++++++++++ slurm.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0016-resume-autocommit-off-option.patch diff --git a/0016-resume-autocommit-off-option.patch b/0016-resume-autocommit-off-option.patch new file mode 100644 index 0000000..4bd87e2 --- /dev/null +++ b/0016-resume-autocommit-off-option.patch @@ -0,0 +1,25 @@ +From a7569a7f39debbebaad4d83c5426dbf6b1cb0d24 Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Thu, 16 May 2024 14:06:08 +0800 +Subject: [PATCH] resume 'autocommit off' option + +--- + src/database/pgsql_common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/database/pgsql_common.c b/src/database/pgsql_common.c +index 1f95330..8191f9e 100755 +--- a/src/database/pgsql_common.c ++++ b/src/database/pgsql_common.c +@@ -974,7 +974,7 @@ extern int pgsql_db_get_db_connection(pgsql_conn_t *pgsql_conn, char *db_name, + SQLSetConnectAttr(pgsql_conn->db_conn, SQL_LOGIN_TIMEOUT, (SQLPOINTER*)5, 0); + SQLSetConnectAttr(pgsql_conn->db_conn, SQL_ATTR_CONNECTION_TIMEOUT, (SQLPOINTER)&my_timeout, 0); + if (pgsql_conn->rollback) { +- //SQLSetConnectAttr(pgsql_conn->db_conn, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_OFF, 0); ++ SQLSetConnectAttr(pgsql_conn->db_conn, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_OFF, 0); + } + + while (!storage_init) { +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index 312e446..2a97b8f 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 18 +%define rel 19 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -31,6 +31,7 @@ Patch12: 0012-fix-some-sql-statements.patch Patch13: 0013-fixed-the-partition-field-in-sql.patch Patch14: 0014-remove-FOR-UPDATE-in-sql.patch Patch15: 0015-fix-partition-conflict-in-tables.patch +Patch16: 0016-resume-autocommit-off-option.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -723,6 +724,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Thu May 16 2024 Xing Liu - 21.08.8-19 +- resume 'autocommit off' option + * Thu May 16 2024 Xing Liu - 21.08.8-18 - fix 'partition' conflict in tables -- Gitee