This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new d1865512dfa Fix AuditLogger may cause IoTDB read only when session
using incorrect password (#12609)
d1865512dfa is described below
commit d1865512dfab5fdaaef10f2a28c05fa6d57da386
Author: Haonan <[email protected]>
AuthorDate: Wed May 29 12:18:07 2024 +0800
Fix AuditLogger may cause IoTDB read only when session using incorrect
password (#12609)
---
.../src/main/java/org/apache/iotdb/db/audit/AuditLogger.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/audit/AuditLogger.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/audit/AuditLogger.java
index 7c17b1bfdbc..43ab611e54b 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/audit/AuditLogger.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/audit/AuditLogger.java
@@ -90,9 +90,9 @@ public class AuditLogger {
insertStatement.setAligned(false);
insertStatement.setValues(
new Object[] {
- new Binary(log, TSFileConfig.STRING_CHARSET),
- new Binary(username, TSFileConfig.STRING_CHARSET),
- new Binary(address, TSFileConfig.STRING_CHARSET)
+ new Binary(log == null ? "null" : log, TSFileConfig.STRING_CHARSET),
+ new Binary(username == null ? "null" : username,
TSFileConfig.STRING_CHARSET),
+ new Binary(address == null ? "null" : address,
TSFileConfig.STRING_CHARSET)
});
insertStatement.setDataTypes(
new TSDataType[] {TSDataType.TEXT, TSDataType.TEXT, TSDataType.TEXT});