From 62a9e41f3a5192160ac4fd799fafaf6b38923115 Mon Sep 17 00:00:00 2001 From: yitegu Date: Tue, 9 Jul 2024 15:45:51 +0800 Subject: [PATCH] mon/scrub: print detail if get error from store Signed-off-by: Yite Gu (cherry picked from commit 50390af720bf45816cbe20264037ec0a4a501240) --- src/mon/Monitor.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index eb903b907b4b3..f0bc3fa8b1311 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -5695,7 +5695,12 @@ bool Monitor::_scrub(ScrubResult *r, bufferlist bl; int err = store->get(k.first, k.second, bl); - ceph_assert(err == 0); + if (err != 0) { + derr << __func__ << " store got: " << cpp_strerror(err) + << " prefix: " << k.first << " key: " << k.second + << dendl; + ceph_abort(); + } uint32_t key_crc = bl.crc32c(0); dout(30) << __func__ << " " << k << " bl " << bl.length() << " bytes" -- 2.39.5