apache/cassandra · warning
Compression provider
Error message
Compression provider {} is not healthy, attempting fallback. What it means
CompressorRegistry.resolveProvider checks each configured compression provider (by class name) for health via isHealthy(). If the provider instantiates but reports itself unhealthy, Cassandra logs this warning and falls back to the next provider in the chain (or the default), rather than failing immediately. It signals that the requested compression implementation exists but cannot operate correctly in this environment.
Solutions
- Check the preceding log lines for the underlying cause (often a Throwable from provider init) and fix the native library / dependency problem
- Verify the compression provider class name in the table's compression options matches an available, healthy provider
- Install or repair the required native compression library for the host OS/architecture
- If the fallback provider is acceptable, remove the unhealthy provider from compression options to silence the warning
Example fix
// before (cqlsh)
ALTER TABLE ks.tbl WITH compression = {'class': 'org.apache.cassandra.io.compress.ZstdCompressor'};
// after — verify native lib first, or fall back explicitly
ALTER TABLE ks.tbl WITH compression = {'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}; Defensive patterns
Strategy: fallback
Validate before calling
// Before enabling a compressor, health-check it in the same JVM:
ICompressor c = CompressorRegistry.tryInstance("org.apache.cassandra.io.compress.ZstdCompressor");
if (c == null || !isHealthy(c)) throw new IllegalStateException("provider unhealthy"); Try / catch
try { provider = CompressorRegistry.getProvider(cls); } catch (Throwable t) { logger.warn("provider {} unusable, using default", cls, t); provider = defaultProvider; } Prevention
- Pin and test native compression libraries in every deployment image
- Smoke-test compressor instantiation on node startup
- Keep compression options aligned with a documented list of supported providers
When it happens
Trigger: A compression_options / sstable compressor config names a provider class that loads but isHealthy() returns false — e.g. a native (JNI) compression library whose native bindings are missing or broken at runtime.
Common situations: Zstd/JNI native libraries absent or incompatible with the OS/arch; a custom compressor plugin deployed with broken dependencies; container images lacking the shared library the provider needs; running on a platform where the bundled native compression is unsupported.
Related errors
- Cannot create CompressionParams for stored parameters
- Cannot initialize class
- CorruptSSTableException / NoSuchFileException: missing…
- Failed to create compressor
- Invalid negative chunk index
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/de0586f20a147370.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/io/compress/CompressorRegistry.java:288
AbstractCompressionProvider resolveProvider(ParameterizedClass providerConfig)
{
if (providerConfig.class_name == null)
throw new ConfigurationException("compressor_providers entry is missing required 'class_name': " + providerConfig);
Map<String, String> p = providerConfig.parameters == null ? Collections.emptyMap() : providerConfig.parameters;
try
{
AbstractCompressionProvider compressionProvider = FBUtilities.newCompressionProvider(providerConfig.class_name);
compressionProvider.init(new HashMap<>(p));
if (compressionProvider.isHealthy())
{
return compressionProvider;
}
else
{
logger.warn("Compression provider {} is not healthy, attempting fallback.", providerConfig.class_name);
}
}
catch (Throwable e)
{
logger.warn("Failed to initialize specified compression provider {}. Will attempt fallback to default if enabled.",
providerConfig.class_name,
e);
}
boolean failOnMissingProvider = Boolean.parseBoolean(p.getOrDefault(FAIL_ON_MISSING_PROVIDER, Boolean.FALSE.toString()));
if (!failOnMissingProvider)
return DEFAULT_COMPRESSION_PROVIDER;
throw new ConfigurationException("Failed to initialize compression provider " + providerConfig);
}
}
View on GitHub (pinned to 88fd0f6a0e)