sunchao commented on code in PR #56293:
URL: https://github.com/apache/spark/pull/56293#discussion_r3360433228


##########
core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java:
##########
@@ -96,6 +97,8 @@ public class TaskMemoryManager {
 
   private final MemoryManager memoryManager;
 
+  private final MemoryAllocator tungstenMemoryAllocator;

Review Comment:
   Thanks for checking. Yes, this overload exists only to inject a 
deterministic failing `MemoryAllocator` in `TaskMemoryManagerSuite`. The 
existing public constructor is unchanged, and the new constructor is 
package-private and `@VisibleForTesting`. 
`MemoryManager.tungstenMemoryAllocator` is final, so keeping only the indirect 
accessor would not let the tests exercise physical allocator OOM independently 
from execution-memory grant failures. I am keeping the test-only overload.



-- 
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]

Reply via email to