Skip to content

[#5460] feat(core): Add FlushIntervalSecs to audit log file writer#5458

Merged
jerryshao merged 4 commits intoapache:mainfrom
FANNG1:audit
Nov 5, 2024
Merged

[#5460] feat(core): Add FlushIntervalSecs to audit log file writer#5458
jerryshao merged 4 commits intoapache:mainfrom
FANNG1:audit

Conversation

@FANNG1
Copy link
Contributor

@FANNG1 FANNG1 commented Nov 5, 2024

What changes were proposed in this pull request?

  1. keep gravitino.audit.enabled configuration consistent with document
  2. add FlushIntervalSecs to flush log writer

Why are the changes needed?

Fix: #5460

Does this PR introduce any user-facing change?

No

How was this patch tested?

enable audit log and check audit is written after about 10s

@FANNG1 FANNG1 marked this pull request as draft November 5, 2024 08:32
@FANNG1 FANNG1 changed the title [MINOR] Add FlushIntervalSecs to audit log file writer [#5460] feat(core): Add FlushIntervalSecs to audit log file writer Nov 5, 2024
@FANNG1 FANNG1 self-assigned this Nov 5, 2024
@FANNG1 FANNG1 marked this pull request as ready for review November 5, 2024 08:57
@FANNG1
Copy link
Contributor Author

FANNG1 commented Nov 5, 2024

@jerryshao , please help to review

Instant now = Instant.now();
if (now.isAfter(nextFlushTime)) {
nextFlushTime = now.plusSeconds(flushIntervalSecs);
Log.info("Try flush audit writer");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this log or change to trace log, otherwise, it will be too verbose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@jerryshao jerryshao merged commit 00a25b2 into apache:main Nov 5, 2024
github-actions bot pushed a commit that referenced this pull request Nov 5, 2024
…5458)

### What changes were proposed in this pull request?
1. keep `gravitino.audit.enabled` configuration consistent with document
2. add FlushIntervalSecs to flush log writer

### Why are the changes needed?

Fix: #5460 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

enable audit log and check audit is written after about 10s
mplmoknijb pushed a commit to mplmoknijb/gravitino that referenced this pull request Nov 6, 2024
…ter (apache#5458)

### What changes were proposed in this pull request?
1. keep `gravitino.audit.enabled` configuration consistent with document
2. add FlushIntervalSecs to flush log writer

### Why are the changes needed?

Fix: apache#5460 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

enable audit log and check audit is written after about 10s
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.

[Improvement] It takes too long time to see the audit log in file

2 participants