fix 'unable to lookup event by levId' crash

This happened when a non-indexOnly scan was paused and then one of the buffered levIds was deleted or replaced before the scan resumed
This commit is contained in:
Doug Hoyte
2023-09-04 15:44:35 -04:00
parent 6216920153
commit c23b10e1d2

View File

@ -265,7 +265,8 @@ struct DBScan : NonCopyable {
if (f.doesMatchTimes(ev.created())) doSend = true;
} else {
approxWork += 10;
if (f.doesMatch(lookupEventByLevId(txn, levId).flat_nested())) doSend = true;
auto view = env.lookup_Event(txn, levId);
if (view && f.doesMatch(view->flat_nested())) doSend = true;
}
if (doSend) {