Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Nov 5, 2024

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 added the branch-0.7 Automatically cherry-pick commit to branch-0.7 label 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
26 checks passed
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
branch-0.7 Automatically cherry-pick commit to branch-0.7
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