pub fn next_epoch(epoch: &[u8]) -> Vec<u8> ⓘ
Expand description
compute the next epoch, and don’t change the bytes of the u8 slice.
§Examples
use risingwave_hummock_sdk::key::next_epoch;
assert_eq!(next_epoch(b"123"), b"124");
assert_eq!(next_epoch(b"\xff\x00\xff"), b"\xff\x01\x00");
assert_eq!(next_epoch(b"\xff\xff"), b"\x00\x00");
assert_eq!(next_epoch(b"\x00\x00"), b"\x00\x01");
assert_eq!(next_epoch(b"S"), b"T");
assert_eq!(next_epoch(b""), b"");