From 6ae7dc5764b5b2fa79a0f2a7c6c2091f45a580e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=A4=A7=E6=B4=8B?= <714403855@qq.com> Date: Thu, 30 Oct 2025 20:46:22 +0800 Subject: [PATCH] fix commit --- src/memos/graph_dbs/polardb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/memos/graph_dbs/polardb.py b/src/memos/graph_dbs/polardb.py index f24f1072c..82b85da25 100644 --- a/src/memos/graph_dbs/polardb.py +++ b/src/memos/graph_dbs/polardb.py @@ -183,7 +183,10 @@ def _get_connection(self): """Get a connection from the pool.""" if self._pool_closed: raise RuntimeError("Connection pool has been closed") - return self.connection_pool.getconn() + conn = self.connection_pool.getconn() + # Set autocommit for PolarDB compatibility + conn.autocommit = True + return conn def _return_connection(self, connection): """Return a connection to the pool."""