]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: use memory temp_store for sqlite3 db 48449/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 11 Oct 2022 17:43:03 +0000 (13:43 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 11 Oct 2022 18:03:14 +0000 (14:03 -0400)
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>
src/pybind/mgr/mgr_module.py
src/pybind/mgr/snap_schedule/fs/schedule_client.py

index 146901b1578efd3663a5d37391b7824f9130291d..746413fa04e0e0c8c6e4943ad4db02f453d32b6c 100644 (file)
@@ -1202,6 +1202,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)