Skip to content

Remove obsolete DataNode audit log appender#18292

Open
CRZbulabula wants to merge 1 commit into
masterfrom
yongzao/remove-datanode-audit-log
Open

Remove obsolete DataNode audit log appender#18292
CRZbulabula wants to merge 1 commit into
masterfrom
yongzao/remove-datanode-audit-log

Conversation

@CRZbulabula

Copy link
Copy Markdown
Contributor

Description

The DataNode Logback configuration still declares an AUDIT rolling file appender that targets log_datanode_audit.log, together with the IoTDB_AUDIT_LOGGER logger. The audit implementation has already been removed, so there are no remaining Java callers. However, Logback initializes the rolling file appender when the DataNode starts, which creates an unused audit log file.

This PR:

  • removes the obsolete audit appender and logger from the production DataNode Logback configuration;
  • removes the equivalent configuration from the three DataNode test configurations;
  • removes the unused AUDIT_LOGGER_NAME constant.

This change only removes the obsolete standalone audit log file output. It does not change the existing audit privilege or authorization behavior.

Verification

  • mvn spotless:apply -pl iotdb-core/node-commons
  • mvn compile -pl iotdb-core/node-commons -DskipTests
  • validated all modified Logback XML files with xmllint
  • confirmed that no audit appender, logger name, or audit log file reference remains in the affected modules

This PR has:

  • been self-reviewed.

Key changed files
  • iotdb-core/datanode/src/assembly/resources/conf/logback-datanode.xml
  • iotdb-core/datanode/src/test/resources/datanode{1,2,3}conf/logback.xml
  • iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.99%. Comparing base (f7be88e) to head (cf68fb1).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18292      +/-   ##
============================================
+ Coverage     42.83%   42.99%   +0.16%     
  Complexity      374      374              
============================================
  Files          5362     5362              
  Lines        381409   381405       -4     
  Branches      49509    49511       +2     
============================================
+ Hits         163368   163992     +624     
+ Misses       218041   217413     -628     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant