Before iterating, we have to figure out where the last delete marker is Then gather the posts that would be above the marker
(f func(ts uint64, pl *pb.PostingList), readTs uint64)
| 285 | // Before iterating, we have to figure out where the last delete marker is |
| 286 | // Then gather the posts that would be above the marker |
| 287 | func (mm *MutableLayer) iterate(f func(ts uint64, pl *pb.PostingList), readTs uint64) uint64 { |
| 288 | if mm == nil { |
| 289 | return 0 |
| 290 | } |
| 291 | |
| 292 | deleteAllMarker := mm.populateDeleteAll(readTs) |
| 293 | mm.iterateCommittedEntries(func(ts uint64, pl *pb.PostingList) { |
| 294 | // Note this might not be required, but just here for safety |
| 295 | if ts >= deleteAllMarker && ts <= readTs { |
| 296 | f(ts, pl) |
| 297 | } |
| 298 | }) |
| 299 | return deleteAllMarker |
| 300 | } |
| 301 | |
| 302 | // insertCommittedPostings inserts an old committed posting in the mutable layer. It also updates fields that are |
| 303 | // cached. This includes deleteAllMarker, length and committedUids map. this should be called while |
no test coverage detected