Commit Graph

17 Commits

Author SHA1 Message Date
Matan Breizman
23c33f69ff src: sed -i 's/WITH_SEASTAR/WITH_CRIMSON/'
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-04-03 07:53:15 +00:00
Matan Breizman
b6f3cda559 */: Cleanup WITH_ALIENSTORE
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-03-11 12:40:42 +00:00
Max Kellermann
ef956e614c libcephsqlite: include cleanup
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
2025-02-13 11:16:52 +01:00
Ronen Friedman
d2b910bfef common/perf_counters: select_labeled_t as a parameter to dumpers
Some counters' dump functions accept 3 bool parameters to
determine some dumping behavior. And multiple 'bool' parameters
are considered a code smell.
This is a minor refactor to replace one of these bools
with a 'select_labeled_t' enum.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2025-01-22 04:00:34 -06:00
Patrick Donnelly
d94684c1ee
libcephsqlite: fill 0s in unread portion of buffer
Unfortunately, this code is filling 0s at the beginning of the short-read
buffer.

Fixes: https://tracker.ceph.com/issues/62492
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-08-22 20:53:11 -04:00
Patrick Donnelly
f7fb996ba4
libcephsqlite: recover from blocklisting
Presently the libcephsqlite library becomes unusable (by design, at the
time) when the RADOS instance it uses is blocklisted. Unfortunately,
it's fairly common for this to happen during disruptive events. For the
ceph-mgr, it's unacceptable to require manual intervention via the
`ceph mgr fail` command.

So, this commit reworks libcephsqlite to reconnect to RADOS when its
cluster handle is blocklisted. This is safe as any open "file" by
sqlite3 has its own ptr to the open cluster handle. So those open files
will all continually fail until sqlite3 closes the handle (on database
connection shutdown). The application can then reopen the database if
desired using the fresh RADOS handle.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-06-27 14:18:16 -04:00
Ali Maredia
56e2a1006f common: Add labeled perf counters
Add the ability to dump labeled perf counters
for a daemon. Labeled perf counters are stored
in a CephContext's PerfCountersCollection.

Labeled and unlabeled perf counters are dumped
to the admin socket via `counters dump` command.

The schema for labeled and unlabeled perf
counters are dumped to the admin socket via
`counters schema` command.

This commit includes docs and additional unit tests

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2023-02-23 12:05:36 -05:00
Ganesh Maharaj Mahalingam
ac043a09c5 libcephsqlite: ceph-mgr crashes when compiled with gcc12
regex in libcephsqlite, when compiled with GCC12 treats '-' as a range
operator resulting in the following error.
"Invalid start of '[x-x]' range in regular expression"

Fixes: https://tracker.ceph.com/issues/55304
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2022-04-12 15:16:01 -07:00
Kefu Chai
b3d7cf423d libcephsqlite: build without "using namespace std"
* add "std::" prefix in headers
* add "using" declarations in .cc files.

so we don't rely on "using namespace std" in one or more included
headers.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-08-13 12:23:37 +08:00
mark15213
e8162b1e2a libcephsqlite: fix unconditional success bug in CheckReservedLock
we don't want to set result to zero at the end.
Otherwise, the if above would be useless and the function cannot be used to check the reserved lock.

Fixes: https://tracker.ceph.com/issues/52001
Signed-off-by: Shuai Wang <shuaiw2@andrew.cmu.edu>
2021-08-04 23:27:23 +08:00
Patrick Donnelly
be86f191e7
cephsqlite: add comment on atexit
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-06-29 08:01:56 -07:00
Patrick Donnelly
7985b282ca
libcephsqlite: register atexit handler for cleanup
We need to tear down the ceph vfs when sqlite3 (or other binaries) call
exit(). Otherwise global state gets destructed which can cause library
threads to segfault or raise exceptions.

Also pull vfs struct out of appdata. We need to be able to detect double
calls to the atexit handler which, sadly, can happen.

Fixes: https://tracker.ceph.com/issues/50503
Fixes: https://tracker.ceph.com/issues/51372
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-06-26 19:29:21 -07:00
Patrick Donnelly
664c259001
libcephsqlite: shutdown RADOS in destructor
Fixes: https://tracker.ceph.com/issues/50503
Fixes: https://tracker.ceph.com/issues/51372
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-06-26 19:29:21 -07:00
Patrick Donnelly
9107e1a347
cephsqlite: add julian day offset in milliseconds
This magic number was copied from another VFS but was not adjusted for
the xCurrentTimeInt64 interface.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-23 18:21:08 -07:00
Patrick Donnelly
f7fa3b50c1
libcephsqlite: rework architecture and backend
This is a complete rewrite on top of SimpleRADOSStriper as well as the
API. The VFS is now a loadable extension as well.

Fixes: https://tracker.ceph.com/issues/40609
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-19 08:52:55 -07:00
Patrick Donnelly
bdb4443c34
cephsqlite: fix compiler errors
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-19 08:52:54 -07:00
Milind Changire
1bc229381a
libcephsqlite: sqlite interface to RADOS
This library provides a SQLite front-end to the RADOS objects.
This effort will help alleviate the restriction on number of key-value pairs
that can be stored in an object.
This interface is a generic one without any constraint on the database
schema either. Library clients can enforce any schema and use SQLite API
to store data in the database backed by RADOS Objects.

Signed-off-by: Milind Changire <mchangir@redhat.com>
2021-03-19 08:52:54 -07:00