2010YOUY01 commented on code in PR #14745:
URL: https://github.com/apache/datafusion/pull/14745#discussion_r1964763701
##########
datafusion/core/tests/memory_limit/memory_limit_validation/sort_mem_validation.rs:
##########
@@ -67,10 +69,35 @@ fn sort_with_mem_limit_2_cols_2_runner() {
spawn_test_process("sort_with_mem_limit_2_cols_2");
}
+/// `spawn_test_process` might trigger multiple recompilations and the test
binary
+/// size might grow indefinitely. This initializer ensures recompilation is
only done
+/// once and the target size is bounded.
+///
+/// TODO: This is a hack, can be cleaned up if we have a better way to let
multiple
+/// test cases run in different processes (instead of different threads by
default)
+fn init_once() {
Review Comment:
I believe there are some subtle differences between the outer/inner test
command to cause the recompilation, I tried to match the option and features
but still can't work.
This `init_once` is to solve the issue that different inner test commands
can trigger multiple recompilation, I think there is no existing mechanism to
coordinate parallel compilation, so this is just a lock to coordinate. Once the
first inner test is compiled, other inner tests can use the same test binary
without recompilation.
--
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]