Skip to content

Conversation

@samikshya-db
Copy link
Contributor

@samikshya-db samikshya-db commented May 12, 2025

Currently, LZ4 compression is not used if module is not found (i..e, when lz4 module is not installed). At times customer is running databricks nodejs driver in Azure functions or a non-supported arch compute, in that case it throws

{...}/node_modules/@databricks/sql/dist/utils/lz4.js:10
            throw err;
            ^

Error: {...}/node_modules/lz4/build/Release/xxhash.node: invalid ELF header
    at Module._extensions..node (node:internal/modules/cjs/loader:1460:18)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/home/dejhjs3e/projects/databricks-node/node_modules/lz4/lib/utils.js:4:11)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Making the error handling more lenient inorder to exclude lz4 compression whenever a dependency error is thrown.

This fixes the problems stated in : #289 #275 #266 #270

@samikshya-db
Copy link
Contributor Author

Closing this in favor of #298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant