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

Fix next_id generation for new records #1

Open
stex opened this issue Apr 22, 2018 · 0 comments
Open

Fix next_id generation for new records #1

stex opened this issue Apr 22, 2018 · 0 comments

Comments

@stex
Copy link
Owner

stex commented Apr 22, 2018

ProxyCache#next_id should create an identifier for a record created in the current transaction which was not used before.

It currently increments an identifier of the format new_\d+ which leads to problems in the following case:

  1. create a new record
  2. delete this record
  3. create another record => it will receive the same identifier

We should most likely be able to simply use SecureRandom for identifier generation and just check for existence.

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

1 participant