]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/smb: add a new sqlite db backed store
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 10 May 2024 19:37:57 +0000 (15:37 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sat, 6 Jul 2024 18:53:06 +0000 (14:53 -0400)
commit615cd84f10546066deb513373ba0b2a60ea6fcbd
tree76fd980b5f8517da47ef5f3ba0a9463a00c00b5e
parent25930c1a52b972fd2053cf9626f95cb60251091b
mgr/smb: add a new sqlite db backed store

Add a new store type that uses a sqlite3 database, stored in rados, for
managing internal resources. The main motivation for this store is to
improve performance, specifically in the case where we need to look
up shares by fields other than the store entry key.

In this store each namespace maps to a table. Each table is managed by a
class that can store a JSON object. The shares table is specialized so
that it can index fields within the JSON and find (cluster_id, name)
pairs efficiently. This allows us to much more quickly determine if
a share's name is already in use by a different share in the same
cluster (the name may be reused in a different cluster w/o issue).

One other important factor when using this store is to use transactions,
via the transaction method (see TransactingConfigStore). If transactions
are not used this store can perform worse than the ModuleConfigStore.
When they are used (correctly) there is a good performance improvement.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/sqlite_store.py [new file with mode: 0644]