MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / is_block_fully_deleted

Method is_block_fully_deleted

nodedb-columnar/src/delete_bitmap.rs:77–87  ·  view source on GitHub ↗

Check whether an entire block is fully deleted. `block_start` is the first row index of the block, `block_len` is the number of rows. Returns true if every row in the range is deleted.

(&self, block_start: u32, block_len: u32)

Source from the content-addressed store, hash-verified

75 /// `block_start` is the first row index of the block, `block_len` is
76 /// the number of rows. Returns true if every row in the range is deleted.
77 pub fn is_block_fully_deleted(&self, block_start: u32, block_len: u32) -> bool {
78 if block_len == 0 {
79 return true;
80 }
81 // Count deleted rows in the range [block_start, block_start + block_len).
82 let count = self
83 .inner
84 .range(block_start..block_start + block_len)
85 .count() as u32;
86 count == block_len
87 }
88
89 /// Apply the delete bitmap to a validity vector: set deleted rows to false.
90 ///

Callers 1

read_column_implMethod · 0.80

Calls 2

countMethod · 0.45
rangeMethod · 0.45

Tested by

no test coverage detected