Closed shaitan closed 10 years ago
Interesting, index_offset
should always be equal to index_size
, no?
UPD: Though, in mobjects.c
we do not set index_offset
because we sort index on open - maybe it's worth fixing it there.
Why do we need both of them if they are always equal to each other? Maybe it is better to get rid of one of them?
We don't - there should be only one of them. But historically size is used for sorted indexes (because it's immutable) and offset is used for non-sorted.
PS. ideally there should be two different data structures with common APIs for sorted and unsorted indexes because otherwise it'll lead to all sorts of misunderstandings.
Fixed faulty comparison index_offset with removed_size by comparison index_size with removed_size. Faulty check led to the situation that the blobs without alive records would never have been removed.