{"record":{"id":"d51d9035455aac28","repo":"apache/cassandra","slug":"failed-closing","errorCode":null,"errorMessage":"Failed closing {}","messagePattern":"Failed closing (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/db/compression/CompressionDictionaryManager.java","lineNumber":402,"sourceCode":"\n    private void unregisterMbean()\n    {\n        if (mbeanRegistered)\n        {\n            MBeanWrapper.instance.unregisterMBean(mbeanName(keyspaceName, tableName), OnException.IGNORE);\n            mbeanRegistered = false;\n        }\n    }\n\n    private void closeQuitely(AutoCloseable closeable, String objectName)\n    {\n        try\n        {\n            closeable.close();\n        }\n        catch (Exception exception)\n        {\n            logger.warn(\"Failed closing {}\", objectName, exception);\n        }\n    }\n}\n","sourceCodeStart":384,"sourceCodeEnd":406,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/compression/CompressionDictionaryManager.java#L384-L406","documentation":"closeQuitely is the manager's swallow-all close helper: it closes a component (trainer, scheduler, cache) and on any exception logs 'Failed closing {objectName}' with the stack trace instead of propagating. It indicates one dictionary-compression component did not shut down cleanly.","triggerScenarios":"close() iterates its closeables and one of their close() implementations throws; closeQuitely catches and logs this warning with the component name and exception.","commonSituations":"Closing while background training/refresh is executing; underlying cache dictionary refs already closed (double close); executor shutdown failures during node shutdown or compression reconfiguration.","solutions":["Read the logged exception to identify which component (trainer/scheduler/cache) failed to close.","Ensure no concurrent schema change disables compression while training is in progress.","Restart the node or re-toggle dictionary compression to rebuild clean component state.","If it recurs deterministically, treat as a bug in that component's close() idempotency and report it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { component.close(); } catch (Exception e) { logger.warn(\"Failed closing {}\", name, e); /* continue shutdown */ }","preventionTips":["Make component close() idempotent so double-close is harmless.","Stop background tasks before closing their owners."],"tags":["compression","close","resource-leak","lifecycle"],"backgroundTag":"resource-cleanup-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"}