While stopping an mds we can reply to a request while all client
sessions are closing. We shouldn't assert in this case.
Fixes: https://tracker.ceph.com/issues/47833
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit
6823d8fb619c07b4e749ae564df565eadc59c187)
// track total and per session load
void SessionMap::hit_session(Session *session) {
uint64_t sessions = get_session_count_in_state(Session::STATE_OPEN) +
- get_session_count_in_state(Session::STATE_STALE);
+ get_session_count_in_state(Session::STATE_STALE) +
+ get_session_count_in_state(Session::STATE_CLOSING);
ceph_assert(sessions != 0);
double total_load = total_load_avg.hit();