When to_remove is 0 and first commited is 0 the maybe trim function
in paxos service.cc calls the trim function with argument to and from
having the same value, which causes the assert statement in the trim
function to fail and the monitor to crash. Modifying the if statement
trim_to <= first commited checks this condition before calling the trim
function and returns if true
Fixes: https://tracker.ceph.com/issues/71610
Signed-off-by: Shreya Subramanian <Shreya.Subramanian@ibm.com>
version_t trim_to = get_trim_to();
dout(20) << __func__ << " " << first_committed << "~" << trim_to << dendl;
- if (trim_to < first_committed) {
- dout(10) << __func__ << " trim_to " << trim_to << " < first_committed "
+ if (trim_to <= first_committed) {
+ dout(10) << __func__ << " trim_to " << trim_to << " <= first_committed "
<< first_committed << dendl;
return;
}