Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

seqid id not always unique #691

Open
ghost opened this issue Jul 24, 2017 · 1 comment
Open

seqid id not always unique #691

ghost opened this issue Jul 24, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 24, 2017

Hi,

The id generated by the seqid package is not guaranteed to be unique:
https://github.com/cloudfoundry-incubator/cf-abacus/blob/94ce220b6217380a52644697fce48dbf981c30d4/lib/utils/seqid/src/index.js#L25-L40

My understanding is that the generated id needs to be globally unique and locally (process-wise) incrementing. Though the latter is true, there are cases when the former might not hold. For example, if the Cloud Foundry Runner hosting the application were to lose connectivity the health management system of Cloud Foundry, it is possbile that Cloud Foundry spawns a duplicate application - in which case the produced IDs would be differentiated only by moment.now().

At this point in time this is purely hypothetical and I don't have a real-life occurance example of that, but looking at the code I decided to bring it up.

@cf-gitbot
Copy link
Collaborator

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/149386387

The labels on this github issue will be updated when the story is started.

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

No branches or pull requests

2 participants