apache/rocketmq · error · AuthenticationException
update user to RocksDB failed
Error message
update user to RocksDB failed
What it means
Error "update user to RocksDB failed" thrown in apache/rocketmq.
Source
Thrown at auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:110
this.storage.delete(AUTH_METADATA_COLUMN_FAMILY, username.getBytes(StandardCharsets.UTF_8));
this.storage.flushWAL();
this.userCache.invalidate(username);
} catch (Exception e) {
throw new AuthenticationException("delete user from RocksDB failed", e);
}
return CompletableFuture.completedFuture(null);
}
@Override
public CompletableFuture<Void> updateUser(User user) {
try {
byte[] keyBytes = user.getUsername().getBytes(StandardCharsets.UTF_8);
byte[] valueBytes = JSON.toJSONBytes(user);
this.storage.put(AUTH_METADATA_COLUMN_FAMILY, keyBytes, keyBytes.length, valueBytes);
this.storage.flushWAL();
this.userCache.invalidate(user.getUsername());
} catch (Exception e) {
throw new AuthenticationException("update user to RocksDB failed", e);
}
return CompletableFuture.completedFuture(null);
}
@Override
public CompletableFuture<User> getUser(String username) {
User user = this.userCache.get(username);
if (user == UserCacheLoader.EMPTY_USER) {
return CompletableFuture.completedFuture(null);
}
return CompletableFuture.completedFuture(user);
}
@Override
public CompletableFuture<List<User>> listUser(String filter) {
List<User> result = new ArrayList<>();
CompletableFuture<List<User>> future = new CompletableFuture<>();
try {View on GitHub (pinned to 293f588571)
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.
When it happens
Trigger: Occurs when updating a user record in the local RocksDB-backed authentication metadata store fails.
Common situations: RocksDB write failure from lock contention, disk I/O errors, corrupted data files, or serialization errors of the user record.
AI-assisted analysis of apache/rocketmq@293f588571 (2026-08-14).
Data as JSON: /api/errors/b0f315dcb7f2b3f2.
Report an issue: GitHub.