Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Handle collision between detector id and task id #361

Open
ylwu-amzn opened this issue Jan 19, 2021 · 0 comments
Open

Handle collision between detector id and task id #361

ylwu-amzn opened this issue Jan 19, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ylwu-amzn
Copy link
Contributor

This issue is from comment #359 (comment)

We track realtime detector error in detection state index and its id is equal to detector id. For historical detector, its task id is a random UUID which is not equal to detector id. We support limited detectors(1K by default) and AD tasks(10K by default). From ES doc,

Each document has an _id that uniquely identifies it, which is indexed so that documents can be looked up either with the GET API or the ids query. The _id can either be assigned at indexing time, or a unique _id can be generated by Elasticsearch

ES already guarantee that all documents written successfully into index have unique id. No need to worry about this collision problem when create AD task. When create realtime detector's detection state doc, we may have collision issue if task id is equal to this detector id.

In universal flow design, will create tasks for realtime detector and use random UUID as doc id to track different realtime detection configuration and execution, then we can solve this collision problem as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant