Skip to main content

cmp_seq

Function cmp_seq 

Source
pub fn cmp_seq(a: &str, b: &str) -> Ordering
Expand description

Compare two DynamoDB stream sequence numbers numerically. Sequence numbers are minted by an atomic counter and zero-padded to a fixed width, so they are also lexicographically ordered; we still parse to u128 so that an un-padded legacy value (or one of a different width) compares correctly.

Exported (via lib.rs) so the Streams->Lambda poller compares checkpoints with the exact same numeric ordering as GetRecords, instead of raw string order (which straddles the old->fixed-width sequence-format change).