]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/MMgrReport: default-initialize PerfCounterType members 69604/head
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Fri, 19 Jun 2026 17:13:41 +0000 (01:13 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Sun, 21 Jun 2026 01:21:13 +0000 (09:21 +0800)
commit61b21c04f4e4519650220dd3c4737976b37268b9
tree51d35c6cbb9f1c41ab44e50e56fc473a7e44a873
parent0bdeb61ac7f992113cb42035a2f0e18dca286121
mgr/MMgrReport: default-initialize PerfCounterType members

readable.sh can fail decoding pre-v3 corpus objects that predate the
unit field, e.g.:

  **** reencode of .../objects/PerfCounterType/... resulted in a different dump ****
  7c7
  <     "unit": 36
  ---
  >     "unit": 101

For struct_v < 3 unit is never decoded and had no in-class default, so
it read indeterminate memory and differed between the two ceph-dencoder
processes readable.sh compares. Default it to UNIT_NONE.

Also default-initialize type to PERFCOUNTER_NONE for consistency.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
src/messages/MMgrReport.h