Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Counter Rollover Mechanism in the Implementation #27

Open
BitYoungjae opened this issue Jun 12, 2023 · 1 comment
Open

Missing Counter Rollover Mechanism in the Implementation #27

BitYoungjae opened this issue Jun 12, 2023 · 1 comment

Comments

@BitYoungjae
Copy link

cuid/src/cuid/min.cljc

Lines 32 to 35 in 0525e9b

(defn ^:private safe-counter! []
(-> counter
(swap! inc)
(str)))

According to the CUID specification, it is described as follows regarding the Counter part:

The counter will roll over if the value gets too big.

It seems like this part has been omitted in the implementation.

@BitYoungjae BitYoungjae changed the title Missing Counter Rollover Mechanism in the CUID Implementation Missing Counter Rollover Mechanism in the Implementation Jun 12, 2023
@hden
Copy link
Owner

hden commented Jun 12, 2023

Yes. You are right. I'll look at it when I can.

In the meanwhile a pull-request can make things much faster ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants