|
To proper restore individual extent we have to calculate HWM from the segment file.
At the current version, segment file has a field `blockCount` which specifies an amount of preallocated blocks inside segment file, but HWM specifies the the last filled block - 1. So based on block count, we can make a binary search for range (0, blockCount) and find the first block with the empty value. Since those file are compressed we have to use header ptrs part.
Note: The HWM is important part, adding this will solve the problem `cpiinfo` as well, the bulk is using `batch` insertion, so it aligns rows to block size (even if we insert 1 row it will increment HWM by one).
|