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

Better aid #2469

Open
mei23 opened this issue Jul 28, 2023 · 0 comments · May be fixed by #2470
Open

Better aid #2469

mei23 opened this issue Jul 28, 2023 · 0 comments · May be fixed by #2470

Comments

@mei23
Copy link
Owner

mei23 commented Jul 28, 2023

Summary

aid互換だけどもっといいid

aid (現行)
ミリ秒タイムスタンプ8文字 + カウンタ2文字(1296通り/10.33bit)
→1296通りだと被りまくる。プロセス間で被る、乱数にしても被る。

aidd (個体ID導入)
ミリ秒タイムスタンプ8文字 + 個体ID1文字(36通り/5.17bit) + カウンタ1文字(36通り/5.17bit)
カウンタ部分2文字を分解して個体IDを使うようにする
→個体ID 36通りじゃ足りないことがある。それ以上ノードあるサーバーあるし、1ノードで数プロセス上がるはず。 (特にv13)

aidd + borrow 1 (タイムスタンプ拝借)
分解能27.78ミリ秒タイムスタンプ7文字 + 個体ID2文字(1296通り/10.33bit) + カウンタ1文字(36通り/5.17bit)
タイムスタンプから下1文字拝借して個体IDに使う、分解能を下げるだけで旧IDとの共存できるようにする

@mei23 mei23 linked a pull request Jul 28, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant