adarshsanjeev commented on code in PR #13846:
URL: https://github.com/apache/druid/pull/13846#discussion_r1118536860
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerMemoryParameters.java:
##########
@@ -439,11 +494,19 @@ private static long memoryNeededForInputChannels(final
int numInputWorkers)
}
/**
- * Amount of heap memory available for our usage.
+ * Amount of heap memory available for our usage. Any computation changes
done to this method should also be done in its corresponding method {@link
WorkerMemoryParameters#estimateTotalMemoryInJvmFromUsableMemory}
+ */
+ private static long computeUsableMemoryInJvm(final long maxMemory, final
long totalLookupFootprint)
+ {
+ return (long) ((maxMemory - totalLookupFootprint) *
USABLE_MEMORY_FRACTION);
+ }
+
+ /**
+ * Estimate amount of heap memory to use in case usable memory is provided.
This method is used for bettter exception messages when {@link
NotEnoughMemoryFault} is thrown.
Review Comment:
Nit: better
--
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]