Increment this [`Lsn`]. The returned [`Lsn`] may not exist upstream yet, but it's guaranteed to sort greater than `self`.
(self)
| 556 | /// The returned [`Lsn`] may not exist upstream yet, but it's guaranteed to |
| 557 | /// sort greater than `self`. |
| 558 | pub fn increment(self) -> Lsn { |
| 559 | let (record_id, carry) = self.record_id.overflowing_add(1); |
| 560 | let (block_id, carry) = self.block_id.overflowing_add(carry.into()); |
| 561 | let (vlf_id, overflow) = self.vlf_id.overflowing_add(carry.into()); |
| 562 | assert!(!overflow, "overflowed Lsn, {self:?}"); |
| 563 | |
| 564 | Lsn { |
| 565 | vlf_id, |
| 566 | block_id, |
| 567 | record_id, |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | /// Drops the `record_id` portion of the [`Lsn`] so we can fit an "abbreviation" |
| 572 | /// of this [`Lsn`] into a [`u64`], without losing the total order. |