-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
It seems the initializeThreadAccountant is made in https://github.com/apache/pinot/blob/master/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/BaseServerStarter.java#L673-L674. Most importantly this is done before startupServiceStatusCheck.
During startupServiceStatusCheck, servers may be under heavy load reloading segments or catching up on kafka ingestion. It's expected their CPU and memory usage will be high, but they are not responding to queries that this time.
The default thread account will actually measure, log, and fire metrics every 10-30ms in that time. This make it tough to monitor this feature because you can't tell if it's firing due to a query or a server being restarted.
I believe we should definitely move the initializeThreadAccountant call down. The best 2 options I see are:
- right before preServeQueries
- right after preServeQueries
We don't use preServeQueries yet, so I don't know what users intend. I imagine we'd want to do it before. The reason being
preServeQueriesshould likely be the same profile as real queries you'll see- so if you want this feature to work on real queries, it should work on
preServeQueries, too