{"record":{"id":"de0586f20a147370","repo":"apache/cassandra","slug":"compression-provider-is-not-healthy-attempting","errorCode":null,"errorMessage":"Compression provider {} is not healthy, attempting fallback.","messagePattern":"Compression provider (.+?) is not healthy, attempting fallback\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/io/compress/CompressorRegistry.java","lineNumber":288,"sourceCode":"    AbstractCompressionProvider resolveProvider(ParameterizedClass providerConfig)\n    {\n        if (providerConfig.class_name == null)\n            throw new ConfigurationException(\"compressor_providers entry is missing required 'class_name': \" + providerConfig);\n\n        Map<String, String> p = providerConfig.parameters == null ? Collections.emptyMap() : providerConfig.parameters;\n\n        try\n        {\n            AbstractCompressionProvider compressionProvider = FBUtilities.newCompressionProvider(providerConfig.class_name);\n            compressionProvider.init(new HashMap<>(p));\n\n            if (compressionProvider.isHealthy())\n            {\n                return compressionProvider;\n            }\n            else\n            {\n                logger.warn(\"Compression provider {} is not healthy, attempting fallback.\", providerConfig.class_name);\n            }\n        }\n        catch (Throwable e)\n        {\n            logger.warn(\"Failed to initialize specified compression provider {}. Will attempt fallback to default if enabled.\",\n                        providerConfig.class_name,\n                        e);\n        }\n\n        boolean failOnMissingProvider = Boolean.parseBoolean(p.getOrDefault(FAIL_ON_MISSING_PROVIDER, Boolean.FALSE.toString()));\n\n        if (!failOnMissingProvider)\n            return DEFAULT_COMPRESSION_PROVIDER;\n\n        throw new ConfigurationException(\"Failed to initialize compression provider \" + providerConfig);\n    }\n}\n","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/io/compress/CompressorRegistry.java#L270-L306","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (cqlsh)\nALTER TABLE ks.tbl WITH compression = {'class': 'org.apache.cassandra.io.compress.ZstdCompressor'};\n// after — verify native lib first, or fall back explicitly\nALTER TABLE ks.tbl WITH compression = {'class': 'org.apache.cassandra.io.compress.LZ4Compressor'};","handlingStrategy":"fallback","validationCode":"// Before enabling a compressor, health-check it in the same JVM:\nICompressor c = CompressorRegistry.tryInstance(\"org.apache.cassandra.io.compress.ZstdCompressor\");\nif (c == null || !isHealthy(c)) throw new IllegalStateException(\"provider unhealthy\");","typeGuard":null,"tryCatchPattern":"try { provider = CompressorRegistry.getProvider(cls); } catch (Throwable t) { logger.warn(\"provider {} unusable, using default\", cls, t); provider = defaultProvider; }","preventionTips":["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"],"tags":["compression","sstable","native-library","fallback"],"backgroundTag":"module-init-failed","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}