-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: zstd with assembly decompression routines won't build on linux #105568
Comments
This reverts commit 975fbcb. The CockroachDB build process is unable to build zstd at v1.5.6 on Linux. Resolving this issue is tracked in cockroachdb/cockroach#105568.
This reverts commit 975fbcb. The CockroachDB build process is unable to build zstd at v1.5.6 on Linux. Resolving this issue is tracked in cockroachdb/cockroach#105568.
I reverted the dependency upgrade for now in cockroachdb/pebble#2679. |
hi all -- loving the work on cockroachdb + pebble. We use pebble is many of our production applications with great success. We'd love to see this zstd ticket solved so it can unblock pebble to be use zstd without crashing. I'm putting up a bounty on this ticket, for anyone who solves this ticket by Jan 1, 2024 I will offer $2k USD bounty. |
@kenliu-crl, @rickystewart do you think we can schedule work on this soon? This may help reduce storage costs of customers and improve TCO if we can unblock use of zstd. |
@kenliu-crl Okay. I'm not sure if this is even large enough to warrant a roadmap item, but I don't know much about the build system at all (: |
I've staged a rebased version of the Pebble changes here: cockroachdb/pebble#3416. And here's a cockroach branch attempting to use those Pebble changes: master...jbowens:cockroach:zstd-debug |
Is there a means to pass C define flags to a dependency? A workaround we can pursue is disabling the assembly routines. This can be done with a minimal patch:
but I imagine there's a way to pass it through bazel? |
Yes, we would probably use |
Changes: * [`7b8b3d5a`](cockroachdb/pebble@7b8b3d5a) *,sstable: upgrade zstd to v1.5.6 * [`3a7021c5`](cockroachdb/pebble@3a7021c5) db: reuse backings for external ingestions This commit bumps the zstd dependency as well, working around cockroachdb#105568 by disabling the assembly routines for now. Informs cockroachdb#105568. Release note: none. Epic: none.
120674: sql: allow procedures to call other procedures r=mgartner a=mgartner #### sql/logictest: add more tests for UDFs calling UDFs This commit rearranges some existing tests and adds a few new tests for UDFs that invoke other UDFs. Release note: None #### sql: allow procedures to call other procedures Fixes #88198 Release note (sql change): Stored procedures can now invoke other stored procedures via `CALL` statements. 120767: go.mod: bump Pebble to 7b8b3d5a8211 r=RaduBerinde a=jbowens Changes: * [`7b8b3d5a`](cockroachdb/pebble@7b8b3d5a) *,sstable: upgrade zstd to v1.5.6 * [`3a7021c5`](cockroachdb/pebble@3a7021c5) db: reuse backings for external ingestions This commit bumps the zstd dependency as well, working around #105568 by disabling the assembly routines for now. Informs #105568. Release note: none. Epic: none. 120776: cli: add support for remote files in debug range-data r=RaduBerinde a=itsbilal Previously, if a Checkpoint was created due to a storage-level replica corruption, we wouldn't be able to read the checkpoint if it contained any remote (shared or external) files as the pebble instance opened with `debug range-data` would not be started with the relevant RemoteStorageFactory. This change adds the same SharedStorage/RemoteStorageFactory params as the usual Pebble start in pkg/server/config.go, so that these checkpoints can be opened. Fixes #119960. Epic: None. Release note: None Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Jackson Owens <[email protected]> Co-authored-by: Bilal Akhtar <[email protected]>
Glad we found a workaround for 24.1 as the benefit (#120784) is significant. Repurposing this issue to be specifically enabling the use of zstd's assembly decompression routines which likely provide a small performance edge on x86 over the C routines we're using now |
Changes: * [`7b8b3d5a`](cockroachdb/pebble@7b8b3d5a) *,sstable: upgrade zstd to v1.5.6 * [`3a7021c5`](cockroachdb/pebble@3a7021c5) db: reuse backings for external ingestions This commit bumps the zstd dependency as well, working around cockroachdb#105568 by disabling the assembly routines for now. Informs cockroachdb#105568. Release note: none. Epic: none.
120784: storage: add storage.sstable.compression_algorithm cluster setting r=jbowens a=jbowens Introduce a new cluster setting that allows the operator to configure the compression algorithm used when compressing sstable blocks. This allows operators to opt into use of zstd (as opposed to the previous setting of snappy). ZSTD typically achieves better compression ratios than snappy, and operators may find that they can achieve higher node densities through enabling zstd. Future releases may change the default compression algorithm. In a side-by-side comparison of a 10000-warehouse tpcc import, the zstd cluster achieved a higher import speed of 146 MiB/s versus snappy's 135 MiB/s. The zstd cluster's physical database size was significantly less (~30%). <img width="976" alt="Screenshot 2024-03-20 at 3 07 13 PM" src="https://github.com/cockroachdb/cockroach/assets/867352/a92a4d6a-135d-4e5c-9b38-794123e8fcec"> <img width="983" alt="Screenshot 2024-03-20 at 3 06 49 PM" src="https://github.com/cockroachdb/cockroach/assets/867352/275f9ecf-1783-4b7b-8159-a734a6275dea"> Informs #105568. Epic: none Release note (ops change): Add `storage.sstable.compression_algorithm` cluster setting that configures the compression algorithm to use when compressing sstable blocks. Co-authored-by: Jackson Owens <[email protected]>
Linking this as a blocker for #123953. |
* Fix the conditional and comments to bring them closer to upstream. The next time we upgrade `rules_go`, we can squash this with the previous commit `0e7e4e31aa49f1afbb402fbb4895f38bc702c88c`. * Make sure to pass in `sSrcs` to `cgo2()`. Part of: cockroachdb/cockroach#105568
* Fix the conditional and comments to bring them closer to upstream. The next time we upgrade `rules_go`, we can squash this with the previous commit `0e7e4e31aa49f1afbb402fbb4895f38bc702c88c`. * Make sure to pass in `sSrcs` to `cgo2()`. Part of: cockroachdb/cockroach#105568
127208: DEPS.bzl: update `rules_go` and enable assembly routines for zstd r=rickystewart a=rickystewart There was an issue with one of our patches to `rules_go` that was fixed in cockroachdb/rules_go#21. We pull in that change and additionally remove our patch that disabled the assembly routines. Closes: #105568 Epic: CRDB-17171 Release note: None Co-authored-by: Ricky Stewart <[email protected]>
There was an issue with one of our patches to `rules_go` that was fixed in cockroachdb/rules_go#21. We pull in that change and additionally remove our patch that disabled the assembly routines. Closes: #105568 Epic: CRDB-17171 Release note: None
There was an issue with one of our patches to `rules_go` that was fixed in cockroachdb/rules_go#21. We pull in that change and additionally remove our patch that disabled the assembly routines. Closes: #105568 Epic: CRDB-17171 Release note: None
…hdb#21) * Fix the conditional and comments to bring them closer to upstream. The next time we upgrade `rules_go`, we can squash this with the previous commit `0e7e4e31aa49f1afbb402fbb4895f38bc702c88c`. * Make sure to pass in `sSrcs` to `cgo2()`. Part of: cockroachdb/cockroach#105568
In cockroachdb/pebble#2668 we upgraded the version of Pebble's dependency on this zstd package. This builds in Pebble's CI across platforms, locally on MacOS and in a Linux gceworker. An attempt to bump the Pebble version of the cockroach repository was made in #105473. While
cockroach
builds on that branch on MacOS, it fails on linux (both in CI & on a gceworker):These symbols appear to be defined here:
https://github.com/DataDog/zstd/blob/ea68dcab66c0fe39989a14c4b6acc520abf80231/huf_decompress_amd64.S#L355
https://github.com/DataDog/zstd/blob/ea68dcab66c0fe39989a14c4b6acc520abf80231/huf_decompress_amd64.S#L99C1-L99C53
However these symbols are marked 'hidden' for ELF targets for an unknown reason:
https://github.com/DataDog/zstd/blob/ea68dcab66c0fe39989a14c4b6acc520abf80231/portability_macros.h#L69-L74
Relevant internal thread.
Jira issue: CRDB-29108
The text was updated successfully, but these errors were encountered: