From: Mohit Agrawal Date: Fri, 14 Jun 2024 08:01:39 +0000 (+0530) Subject: mgr: Convert the last_event_detail data_type to std::string X-Git-Tag: v19.1.1~17^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d2fd2af162054623c5ca9b648669247471e034d;p=ceph.git mgr: Convert the last_event_detail data_type to std::string During restart of osd and run a command "ceph tell mgr dump_historic_ops_by_duration" the flag_point shows some garbage characters. The garbage character is showing due to having garbage value of last_event_detail string variable. The data type of last_event_detail is const char* not a std::string so the value can become garbage during call op->mark_reched so to avoid an issue change the data type. Fixes: https://tracker.ceph.com/issues/66268 Signed-off-by: Mohit Agrawal (cherry picked from commit 16b3343bb44b92b558a7ed077563aa72cbd520a9) --- diff --git a/src/mgr/MgrOpRequest.h b/src/mgr/MgrOpRequest.h index 9e67af080f81..5b29e5980a33 100644 --- a/src/mgr/MgrOpRequest.h +++ b/src/mgr/MgrOpRequest.h @@ -32,7 +32,7 @@ private: entity_inst_t req_src_inst; uint8_t hit_flag_points; uint8_t latest_flag_point; - const char* last_event_detail = nullptr; + std::string last_event_detail; static const uint8_t flag_started = 1 << 0; static const uint8_t flag_queued_for_module = 1 << 1;