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

Handle collision between detector id and task id #361

@ylwu-amzn

Description

@ylwu-amzn

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions