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

Incremented record ID #173

Open
dipakw opened this issue Feb 22, 2020 · 4 comments
Open

Incremented record ID #173

dipakw opened this issue Feb 22, 2020 · 4 comments

Comments

@dipakw
Copy link

dipakw commented Feb 22, 2020

HouzuoGuo,

By incremented IDs, I mean ID 1 for first record, 2 for second record, 3 for third and so forth.

I am pretty interested in tiedot, played around it, I find it suitable for my project. One thing I am pretty annoyed of, is, it uses generated IDs. I looked into code and found that rand.Int() is used to generate new ID.

To me, it would be awesome if there won't be any issues with incremented IDs. I tried modifying Insert function little to achieve that, and achieved.

My question is that, are there any potential issues that will occur doing so?

@HouzuoGuo
Copy link
Owner

Thanks for your interest in this project @dipakw. That's a good suggestion, in fact I wish I had used that approach to begin with.

@dipakw
Copy link
Author

dipakw commented Feb 23, 2020

I appreciate your immediate response, HouzuoGuo. If I get extra hours to do it properly, and think like good to propagate to others as well, you might get pull request in the future.

@HouzuoGuo
Copy link
Owner

many thanks for your contribution @dipakw !

@adiroiban
Copy link

I think that rand.int() can also end up with a high probability of a conflict... so an UUID can help for unique / unpredictable ID.

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

3 participants