-
Notifications
You must be signed in to change notification settings - Fork 582
Add conditional artificial delay #11139
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
Conversation
Signed-off-by: Marco Pracucci <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
IngestionArtificialDelayConditionForTenantsWithIDGreaterThan int `yaml:"ingestion_artificial_delay_condition_for_tenants_with_id_greater_than" json:"ingestion_artificial_delay_condition_for_tenants_with_id_greater_than" category:"experimental" doc:"hidden"` | ||
IngestionArtificialDelayDurationForTenantsWithIDGreaterThan model.Duration `yaml:"ingestion_artificial_delay_duration_for_tenants_with_id_greater_than" json:"ingestion_artificial_delay_duration_for_tenants_with_id_greater_than" category:"experimental" doc:"hidden"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this option is potentially very dangerous as it becomes extremely easy to be greedy with the selection - I was going to suggest logging for this condition so that we can audit the ID selection but this has the potential to be extremely expensive on such a hot path.
I'll leave the judgement up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see it more risky than the global config option that applies the same latency to all tenants. This option, at most, will apply it to all tenants. What risk do you foresee? Any practical example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you set it globally, it's because you really want to set it for all tenants.
Maybe, I don't understand the practical use case well enough - but I'm thinking about a scenario where I want to select IDs 1
, 2
and 3
so I set it to 0
and then either 4
gets created in gcom or I don't realise there was a 4
to begin with so that also ends up with the latency when I originally didn't want to select it.
It might as well be safe to select an ID that was newly created or wasn't intended, but the point stand that you select something you weren't expecting.
As I said, I don't have a problem with it and feel free to merge/continue it was mostly an observation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok let's discuss it offline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline. Josh is fine.
What this PR does
This PR is a follow up of #10107. I have more uses cases where I need to conditionally enable the artificial delay (for testing purposes) on a large number of tenants that may change over time. The two specific use cases are:
In this PR I'm adding more config options to support such use cases (hidden from the doc, given they're for testing purposes).
Which issue(s) this PR fixes or relates to
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.