gianm commented on code in PR #13271:
URL: https://github.com/apache/druid/pull/13271#discussion_r1010962046
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/IndexerWorkerContext.java:
##########
@@ -250,8 +242,8 @@ public FrameContext frameContext(QueryDefinition queryDef,
int stageNumber)
indexIO,
dataSegmentProvider,
WorkerMemoryParameters.compute(
- Runtime.getRuntime().maxMemory(),
- numWorkersInJvm,
+ computeAvailableHeapMemory(),
Review Comment:
It does need to be done on each worker, because the workers and the
controller might have different amounts of memory available to them. (Imagine a
job running through a rolling update that alters the amount of available
memory.)
Good point that we should avoid needless recomputation of this. I updated
things to compute it a single time per worker, as part of
`IndexerWorkerContext#createProductionInstance`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]