ceph: only send metrics when the MDS rank is ready
authorXiubo Li <xiubli@redhat.com>
Wed, 31 May 2023 08:06:55 +0000 (16:06 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 30 Jun 2023 10:08:54 +0000 (12:08 +0200)
commitf7c2f4f6ce16fb58f7d024f3e1b40023c4b43ff9
tree1cfca6cda8791177e2188923e233350ccadcbbc4
parent6995e2de6891c724bfeb2db33d7b87775f913ad1
ceph: only send metrics when the MDS rank is ready

When the MDS rank is in clientreplay state, the metrics requests
will be discarded directly. Also, when there are a lot of known
client requests to recover from, the metrics requests will slow
down the MDS rank from getting to the active state sooner.

With this patch, we will send the metrics requests only when the
MDS rank is in active state.

Link: https://tracker.ceph.com/issues/61524
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/metric.c