On gotoEnd(), the records in the last node in the iterator may have
higher sequence number than the iterator has. In such a case, there
is no valid record in the node, hence we should do backward search
until we find the first valid node. Otherwise, crash happens in the
following get() API due to null record.
On gotoEnd(), the records in the last node in the iterator may have higher sequence number than the iterator has. In such a case, there is no valid record in the node, hence we should do backward search until we find the first valid node. Otherwise, crash happens in the following get() API due to null record.
Same to gotoBegin().