It's too difficult to simulate power outage during multi-block transaction on disk, so the way I test this patch is to simulate a multi-block transaction and trigger a decode error in
try {
auto p = bl.cbegin();
decode(t, p);
seen_recs = true;
}
Add the following line right after decode(t, p) to throw an error
throw buffer::malformed_input("error test");
According to the patch description https://github.com/ceph/ceph/pull/42830
this error will be considered as a normal bluefs log reply stop condition and will *not* prevent OSD from starting
After the error test is triggered, OSD can still be started normally
Update test case
It's too difficult to simulate power outage during multi-block transaction on disk, so the way I test this patch is to simulate a multi-block transaction and trigger a decode error in
try {
auto p = bl.cbegin();
decode(t, p);
seen_recs = true;
}
Add the following line right after decode(t, p) to throw an error :malformed_ input(" error test");
throw buffer:
According to the patch description https:/ /github. com/ceph/ ceph/pull/ 42830
this error will be considered as a normal bluefs log reply stop condition and will *not* prevent OSD from starting
After the error test is triggered, OSD can still be started normally