]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: use memory temp_store for sqlite3 db 50286/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 11 Oct 2022 17:43:03 +0000 (13:43 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 27 Feb 2023 15:54:30 +0000 (10:54 -0500)
It appears some situations require sqlite3 to open a temporary database
to execute the old database dump.

Fixes: https://tracker.ceph.com/issues/57851
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 8d853cc4990dc4dbccdc916115b0b30e0ac9dc19)

src/pybind/mgr/mgr_module.py
src/pybind/mgr/snap_schedule/fs/schedule_client.py

index bd6872b688d71e8b1f102cde8855e4c9ec126d8a..338b03dfdd7573994772d75261b4f54ed2693b4d 100644 (file)
@@ -1197,6 +1197,7 @@ class MgrModule(ceph_module.BaseMgrModule, MgrModuleLoggingMixin):
         db.execute('PRAGMA JOURNAL_MODE = PERSIST')
         db.execute('PRAGMA PAGE_SIZE = 65536')
         db.execute('PRAGMA CACHE_SIZE = 64')
+        db.execute('PRAGMA TEMP_STORE = memory')
         db.row_factory = sqlite3.Row
         self.load_schema(db)
 
index 486582074767ed303dac712ceac7481dd01cb8cf..1fc3217ec7d266188a1866b95709eadeb6ced133 100644 (file)
@@ -193,6 +193,7 @@ class SnapSchedClient(CephfsClient):
             db.execute('PRAGMA JOURNAL_MODE = PERSIST')
             db.execute('PRAGMA PAGE_SIZE = 65536')
             db.execute('PRAGMA CACHE_SIZE = 256')
+            db.execute('PRAGMA TEMP_STORE = memory')
             db.row_factory = sqlite3.Row
             # check for legacy dump store
             pool_param = cast(Union[int, str], poolid)