Repository navigation
v2.0.3
CHANGES
-
fix(algo): reverted the update of
v2.0.2that removed the reset of sequence number to 0. -
feat(algo): added
onTimeReversedoption to Snowflake (SI) algorithms.This option allows the user to specify a strategy for handling time reversals in the Snowflake (SI) algorithm.
The default strategy isTHROW_ERROR, to keep the compatibility with previous versions. -
feat(algo): added
onTimeChangedoption to Snowflake (SI) algorithms.This option allows the user to customize the behavior of the sequence number, when the time is changed.
The default strategy is toRESETthe sequence number to 0, which is compatible with previous versions.This option could cooperate with the
sequenceResetThresholdoption, so that only when the current sequence
number is up to the threshold, the sequence number will be reset to 0.