{"record":{"id":"b0f315dcb7f2b3f2","repo":"apache/rocketmq","slug":"update-user-to-rocksdb-failed","errorCode":null,"errorMessage":"update user to RocksDB failed","messagePattern":"update user to RocksDB failed","errorType":"exception","errorClass":"AuthenticationException","httpStatus":null,"severity":"error","filePath":"auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java","lineNumber":110,"sourceCode":"            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\n    @Override\n    public CompletableFuture<User> getUser(String username) {\n        User user = this.userCache.get(username);\n        if (user == UserCacheLoader.EMPTY_USER) {\n            return CompletableFuture.completedFuture(null);\n        }\n        return CompletableFuture.completedFuture(user);\n    }\n\n    @Override\n    public CompletableFuture<List<User>> listUser(String filter) {\n        List<User> result = new ArrayList<>();\n        CompletableFuture<List<User>> future = new CompletableFuture<>();\n        try {","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/apache/rocketmq/blob/293f5885719fc4aa3619446a1900f58ccfcfdd29/auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java#L92-L128","documentation":"Error \"update user to RocksDB failed\" thrown in apache/rocketmq.","triggerScenarios":"Occurs when updating a user record in the local RocksDB-backed authentication metadata store fails.","commonSituations":"RocksDB write failure from lock contention, disk I/O errors, corrupted data files, or serialization errors of the user record.","solutions":["Verify the target user exists before updating it in the auth_user RocksDB store.","Check RocksDB health (lock, disk space, corruption) in the broker logs and resolve the root cause.","Retry the updateUser operation after the metadata store is healthy."],"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-15T17:31:12.345Z"}