Skip to content

v2.0.3

Choose a tag to compare

@fenying fenying released this 26 Jul 01:33
· 22 commits to master since this release
v2.0.3
ceb0d41

CHANGES

  • fix(algo): reverted the update of v2.0.2 that removed the reset of sequence number to 0.

  • feat(algo): added onTimeReversed option 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 is THROW_ERROR, to keep the compatibility with previous versions.

  • feat(algo): added onTimeChanged option 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 to RESET the sequence number to 0, which is compatible with previous versions.

    This option could cooperate with the sequenceResetThreshold option, so that only when the current sequence
    number is up to the threshold, the sequence number will be reset to 0.