From 68610470c486b0d714afeff6f7300ea82368233c Mon Sep 17 00:00:00 2001
From: Guofu Li
Date: Thu, 25 Aug 2022 12:59:45 +0800
Subject: [PATCH] Buf fixes: (`DDBHFTLoader.py`) Mannually close the `ddb_sess`
in parallel jobs to avoid memory leaks.
---
src/loader/DDBHFTLoader.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/loader/DDBHFTLoader.py b/src/loader/DDBHFTLoader.py
index 0a0ba7a..2a02166 100644
--- a/src/loader/DDBHFTLoader.py
+++ b/src/loader/DDBHFTLoader.py
@@ -482,4 +482,7 @@ class DDBHFTLoader(DDBLoader):
df_table_name = df_table_name
))
+ # 由于不是复用`DDBHFTLoader`对象内部的Session,因此如果不手动关闭就会造成内存逐渐泄漏
+ ddb_sess.close()
+