-
Notifications
You must be signed in to change notification settings - Fork 228
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
feat(query): add TenantIngestionMetering query throttle #1310
base: develop
Are you sure you want to change the base?
Conversation
aea4659
to
ca17e67
Compare
ca17e67
to
f76b59c
Compare
f76b59c
to
4dd70ae
Compare
coordinator/src/main/scala/filodb.coordinator/TenantIngestionMetering.scala
Outdated
Show resolved
Hide resolved
49abfae
to
07cd6cd
Compare
07cd6cd
to
072a254
Compare
072a254
to
6ad22b4
Compare
settings, | ||
() => { _datasetInfo.map{ case (dsRef, _) => dsRef}.toIterator }, | ||
() => { _coordinators.head._2 }) | ||
inst.schedulePeriodicPublishJob() |
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.
No real reason to require this method to be called after initialization.
coordinator/src/main/scala/filodb.coordinator/TenantIngestionMetering.scala
Outdated
Show resolved
Hide resolved
private val SCHED_INIT_DELAY = ASK_TIMEOUT // time until first job is scheduled | ||
private val SCHED_DELAY = ASK_TIMEOUT // time between all jobs after the first | ||
|
||
private val CLUSTER_TYPE = settings.config.getString("cluster-type") | ||
|
||
private val METRIC_ACTIVE = "active_timeseries_by_tenant" | ||
private val METRIC_TOTAL = "total_timeseries_by_tenant" |
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.
Moved to companion object.
f1bfaed
to
6cb0c28
Compare
object TenantIngestionMetering { | ||
protected val METRIC_ACTIVE = "active_timeseries_by_tenant" | ||
protected val METRIC_TOTAL = "total_timeseries_by_tenant" | ||
protected val PARALLELISM = 8 // number of datasets queried in parallel |
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.
Unsure what this should be-- should I make it configurable? Or get the number of cores from the JRE?
Pull Request checklist
Current behavior :
TenantIngestionMetering
queries might consistently take longer than the static timeout duration. No timeseries would be published.New behavior :
Adds a throttling subclass to monitor query timeouts. This class adjusts the query frequency and timeout duration according to the count of timeouts in a lookback window.