]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/smb: add store transactions to parts of the handler
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 15 May 2024 22:25:40 +0000 (18:25 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sat, 6 Jul 2024 18:53:06 +0000 (14:53 -0400)
commit25930c1a52b972fd2053cf9626f95cb60251091b
tree8498869b064acc86ec6088bf4fa0dc76cca00777
parent29ab71466be6651c40e5e8b421f4b096ef395d7a
mgr/smb: add store transactions to parts of the handler

Add a wrapper contextmethod that initiates a transaction on a store if said
store supports transactions (otherwise the ctx manager is a no-op).
Use the wrapper over certain functions in the handler where many store
operations may be needed. This makes a big performance difference when
using a sqlite db backed store.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/handler.py