chore: replace deprecated HELIO_STACK_CHECK (#4465)

* remove HELIO_STACK_CHECK
* use FLAGS_fiber_safety_margin

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
Kostas Kyrimis 2025-01-20 10:17:24 +02:00 committed by GitHub
parent ac8e1c80f0
commit c759eb8ce6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 12 deletions

View file

@ -78,16 +78,9 @@ io::Result<io::Bytes> Lz4Compressor::Compress(io::Bytes data) {
compr_buf_.reserve(buf_size);
}
// TODO: to remove LZ4F_compressFrame code once we confirm this code actually works.
#if 1
size_t frame_size =
LZ4F_compressFrame_usingCDict(cctx_, compr_buf_.data(), compr_buf_.capacity(), data.data(),
data.size(), nullptr /* dict */, &lz4_pref);
#else
size_t frame_size = LZ4F_compressFrame(compr_buf_.data(), compr_buf_.capacity(), data.data(),
data.size(), &lz4_pref);
#endif
if (LZ4F_isError(frame_size)) {
LOG(ERROR) << "LZ4F_compressFrame failed with error " << LZ4F_getErrorName(frame_size);
return nonstd::make_unexpected(make_error_code(errc::operation_not_supported));