{"record":{"id":"45d11528197405d7","repo":"apache/rocketmq","slug":"delete-user-from-rocksdb-failed","errorCode":null,"errorMessage":"delete user from RocksDB failed","messagePattern":"delete user from RocksDB failed","errorType":"exception","errorClass":"AuthenticationException","httpStatus":null,"severity":"error","filePath":"auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java","lineNumber":96,"sourceCode":"            byte[] keyBytes = user.getUsername().getBytes(StandardCharsets.UTF_8);\n            byte[] valueBytes = JSON.toJSONBytes(user);\n            this.storage.put(AUTH_METADATA_COLUMN_FAMILY, keyBytes, keyBytes.length, valueBytes);\n            this.storage.flushWAL();\n            this.userCache.invalidate(user.getUsername());\n        } catch (Exception e) {\n            throw new AuthenticationException(\"create user to RocksDB failed\", e);\n        }\n        return CompletableFuture.completedFuture(null);\n    }\n\n    @Override\n    public CompletableFuture<Void> deleteUser(String username) {\n        try {\n            this.storage.delete(AUTH_METADATA_COLUMN_FAMILY, username.getBytes(StandardCharsets.UTF_8));\n            this.storage.flushWAL();\n            this.userCache.invalidate(username);\n        } catch (Exception e) {\n            throw new AuthenticationException(\"delete user from RocksDB failed\", e);\n        }\n        return CompletableFuture.completedFuture(null);\n    }\n\n    @Override\n    public CompletableFuture<Void> updateUser(User user) {\n        try {\n            byte[] keyBytes = user.getUsername().getBytes(StandardCharsets.UTF_8);\n            byte[] valueBytes = JSON.toJSONBytes(user);\n            this.storage.put(AUTH_METADATA_COLUMN_FAMILY, keyBytes, keyBytes.length, valueBytes);\n            this.storage.flushWAL();\n            this.userCache.invalidate(user.getUsername());\n        } catch (Exception e) {\n            throw new AuthenticationException(\"update user to RocksDB failed\", e);\n        }\n        return CompletableFuture.completedFuture(null);\n    }\n","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/apache/rocketmq/blob/293f5885719fc4aa3619446a1900f58ccfcfdd29/auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java#L78-L114","documentation":"Error \"delete user from RocksDB failed\" thrown in apache/rocketmq.","triggerScenarios":"Occurs when deleting a user from the local RocksDB-backed authentication metadata store fails.","commonSituations":"RocksDB write failure due to lock contention, disk errors, or corruption; attempting to delete while the store is unavailable.","solutions":["Confirm the user exists in the auth_user RocksDB store before attempting deletion.","Check that the RocksDB directory is writable and not locked by another process.","Inspect broker logs for the underlying RocksDB exception and retry the deleteUser operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"293f5885719fc4aa3619446a1900f58ccfcfdd29","analyzedAt":"2026-08-14T11:50:13.822Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}