Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nautilus: core: lazy omap stat collection #29188

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions qa/suites/rados/singleton-nomsgr/all/lazy_omap_stats_output.yaml
@@ -0,0 +1,16 @@
openstack:
- volumes: # attached to each instance
count: 2
size: 10 # GB
roles:
- [mon.a, mgr.x, osd.0, osd.1, osd.2, client.0]
overrides:
ceph:
log-whitelist:
- \(POOL_APP_NOT_ENABLED\)
tasks:
- install:
- ceph:
- exec:
client.0:
- ceph_test_lazy_omap_stats
4 changes: 4 additions & 0 deletions src/osd/PGBackend.cc
Expand Up @@ -1247,6 +1247,10 @@ void PGBackend::be_omap_checks(const map<pg_shard_t,ScrubMap*> &maps,
// Iterate through objects and update omap stats
for (const auto& k : master_set) {
for (const auto& map : maps) {
if (map.first != get_parent()->primary_shard()) {
// Only set omap stats for the primary
continue;
}
auto it = map.second->objects.find(k);
if (it == map.second->objects.end())
continue;
Expand Down
1 change: 1 addition & 0 deletions src/test/CMakeLists.txt
Expand Up @@ -68,6 +68,7 @@ add_subdirectory(system)
if(WITH_FIO OR WITH_SYSTEM_FIO)
add_subdirectory(fio)
endif()
add_subdirectory(lazy-omap-stats)

# test_timers
add_executable(ceph_test_timers
Expand Down
10 changes: 10 additions & 0 deletions src/test/lazy-omap-stats/CMakeLists.txt
@@ -0,0 +1,10 @@
# Lazy omap stat collection tests

add_executable(ceph_test_lazy_omap_stats
main.cc
lazy_omap_stats_test.cc)
target_link_libraries(ceph_test_lazy_omap_stats
librados ${UNITTEST_LIBS} Boost::system)
install(TARGETS
ceph_test_lazy_omap_stats
DESTINATION ${CMAKE_INSTALL_BINDIR})