Skip to content

Commit 3d198fb

Browse files
lmanganiauxten
authored andcommitted
AWS Lambda compatibility (#9)
* PR_SET_NAME workaround AWS Lambdas (and other virtualized platforms) lack of support for PR_SET_NAME causing a blocking exception. Pending an upstream PR or fix in ClickHouse, this patch allows this function to fail unharmed. The resulting executable has been tested on various platforms without drawbacks and discussed in clickhouse issue [29378](ClickHouse/ClickHouse#29378) $ sed -i '/Cannot set thread name/c\' /ClickHouse/src/Common/setThreadName.cpp * Disable AVX2 support
1 parent 95dbee4 commit 3d198fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

chdb/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ elif [ "$(uname)" == "Linux" ]; then
4343
GLIBC_COMPATIBILITY="-DGLIBC_COMPATIBILITY=1"
4444
UNWIND="-DUSE_UNWIND=1"
4545
PYINIT_ENTRY="-Wl,-ePyInit_${CHDB_PY_MOD}"
46-
AVX_SUPPORT="-DENABLE_AVX=1 -DENABLE_AVX2=1"
46+
AVX_SUPPORT="-DENABLE_AVX=1 -DENABLE_AVX2=0"
4747
EMBEDDED_COMPILER="-DENABLE_EMBEDDED_COMPILER=1"
4848
else
4949
echo "OS not supported"

src/Common/setThreadName.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void setThreadName(const char * name)
4545
#else
4646
if (0 != prctl(PR_SET_NAME, name, 0, 0, 0))
4747
#endif
48-
DB::throwFromErrno("Cannot set thread name with prctl(PR_SET_NAME, ...)", DB::ErrorCodes::PTHREAD_ERROR);
48+
// DB::throwFromErrno("Cannot set thread name with prctl(PR_SET_NAME, ...)", DB::ErrorCodes::PTHREAD_ERROR);
4949

5050
memcpy(thread_name, name, 1 + strlen(name));
5151
}

0 commit comments

Comments
 (0)