nferrario commented on code in PR #117:
URL: https://github.com/apache/flink-docker/pull/117#discussion_r897886228


##########
1.15/scala_2.12-java11-debian/docker-entrypoint.sh:
##########
@@ -91,7 +91,12 @@ prepare_configuration() {
 
 maybe_enable_jemalloc() {
     if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
-        export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
+        # Maybe use export LD_PRELOAD=$LD_PRELOAD:/usr/lib/$(uname 
-i)-linux-gnu/libjemalloc.so
+        if [[ `uname -i` == 'aarch64' ]]; then
+            export 
LD_PRELOAD=$LD_PRELOAD:/usr/lib/aarch64-linux-gnu/libjemalloc.so

Review Comment:
   Since we're using a Debian-based image, `uname` should always return what we 
expect. The reason why I said `in case uname -i returns something other than 
x86_64 on an actual x64 host` is to NOT affect x64, not even by accident.
   
   We can definitely check whether the file exists. I feel like `uname -i` is a 
cleaner approach, but I'm open to suggestions :) 



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

Reply via email to