Merge pull request #21580 from xiexingguo/wip-add-assert

osd/PGLog: assert out on performing overflowed log trimming

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-04-23 09:59:46 -05:00 committed by GitHub
commit 7003d415db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,9 +52,10 @@ void PGLog::IndexedLog::trim(
{
if (complete_to != log.end() &&
complete_to->version <= s) {
generic_dout(0) << " bad trim to " << s << " when complete_to is "
<< complete_to->version
<< " on " << *this << dendl;
generic_derr << " bad trim to " << s << " when complete_to is "
<< complete_to->version
<< " on " << *this << dendl;
assert(0 == "out of order trim");
}
assert(s <= can_rollback_to);