MCPcopy Create free account
hub / github.com/ceph/ceph / db

Method db

src/pybind/mgr/mgr_module.py:1373–1383  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1371
1372 @property
1373 def db(self) -> sqlite3.Connection:
1374 assert self._db_lock.locked()
1375 if self._db is not None:
1376 return self._db
1377 db_allowed = self.get_ceph_option("mgr_pool")
1378 if not db_allowed:
1379 raise MgrDBNotAllowed()
1380 self._db = self.open_db()
1381 if self._db is None:
1382 raise MgrDBNotReady()
1383 return self._db
1384
1385 @contextmanager
1386 def exclusive_db_access(self) -> Iterator[sqlite3.Connection]:

Callers

nothing calls this directly

Calls 5

get_ceph_optionMethod · 0.95
open_dbMethod · 0.95
MgrDBNotAllowedClass · 0.85
MgrDBNotReadyClass · 0.85
lockedMethod · 0.80

Tested by

no test coverage detected