You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
DBIter has fast next mode, which works faster in YB scenarios while iteration goes only in forward direction.
But it does not work correctly in conjunction with backward iteration.
As result process could crash during unique index back in HasDuplicateUniqueIndexValueBackward.
The DB state that leads to crash is the following:
1) Suppose we are trying to check index entry with some key.
2) There are should be intents after this key (could be entries from different table), but no records in regular DB.
3) There is should be exacly only record in regular DB before this key (could be entry from different table).
This this case SeekToLast will be invoked by IntentAwareIterator::FindOldestRecord.
It will position regular DB DBIter to entry (3) and underlying memtable iterator to invalid (i.e. null) position.
Calling Next on DBIter will result in call to FastNext and it will call Next on underlying memtable iterator in null position.
Which least to crash.
Fixed by disabling fast next mode in SeekToLast, like it was already done in Prev.
Test Plan: PgIndexBackfillIgnoreApplyTest.Backward
Reviewers: rthallam, huapeng.yuan
Reviewed By: huapeng.yuan
Subscribers: ybase, yql
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D48206
0 commit comments