Skip to content

Commit af89531

Browse files
wustzdyCaralHsi
andauthored
fix commit (#427)
Co-authored-by: CaralHsi <[email protected]>
1 parent 28cf578 commit af89531

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/memos/graph_dbs/polardb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ def _get_connection(self):
183183
"""Get a connection from the pool."""
184184
if self._pool_closed:
185185
raise RuntimeError("Connection pool has been closed")
186-
return self.connection_pool.getconn()
186+
conn = self.connection_pool.getconn()
187+
# Set autocommit for PolarDB compatibility
188+
conn.autocommit = True
189+
return conn
187190

188191
def _return_connection(self, connection):
189192
"""Return a connection to the pool."""

0 commit comments

Comments
 (0)