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

[#6537] improvement(core): Change the level of some log in LockManager and GarbageCollector from INFO to DEBUG #6539

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/src/main/java/org/apache/gravitino/lock/LockManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ private void startDeadLockChecker() {

deadLockChecker.scheduleAtFixedRate(
() -> {
LOG.info("Start to check the dead lock...");
LOG.debug("Start to check the dead lock...");
checkDeadLock(treeLockRootNode);
LOG.info("Finish to check the dead lock...");
LOG.debug("Finish to check the dead lock...");
},
0,
60,
Expand Down Expand Up @@ -161,12 +161,12 @@ private void startNodeCleaner() {
lockCleaner.scheduleAtFixedRate(
() -> {
long nodeCount = totalNodeCount.get();
LOG.info("Total tree lock node count: {}", nodeCount);
LOG.debug("Total tree lock node count: {}", nodeCount);
// If the total node count is greater than the maxTreeNodeInMemory * 0.5, we will do the
// clear up in case of the memory explosion.
if (nodeCount > maxTreeNodeInMemory * 0.5) {
StopWatch watch = StopWatch.createStarted();
LOG.trace("Start to clean up the stale tree lock nodes...");
LOG.info("Start to clean up the stale tree lock nodes...");
Copy link
Contributor

Choose a reason for hiding this comment

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

It it ok to use info?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line will be printed only when nodeCount > maxTreeNodeInMemory * 0.5; in this case, we did need to give the user some information.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok.

treeLockRootNode
.getAllChildren()
.forEach(child -> evictStaleNodes(child, treeLockRootNode));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ public void start() {
@VisibleForTesting
public void collectAndClean() {
long threadId = Thread.currentThread().getId();
LOG.info("Thread {} start to collect garbage...", threadId);
LOG.debug("Thread {} start to collect garbage...", threadId);

try {
LOG.info("Start to collect and delete legacy data by thread {}", threadId);
LOG.debug("Start to collect and delete legacy data by thread {}", threadId);
long legacyTimeline = System.currentTimeMillis() - storeDeleteAfterTimeMillis;
for (Entity.EntityType entityType : Entity.EntityType.values()) {
long deletedCount = Long.MAX_VALUE;
LOG.info(
LOG.debug(
"Try to physically delete {} legacy data that has been marked deleted before {}",
entityType,
legacyTimeline);
Expand All @@ -94,7 +94,7 @@ public void collectAndClean() {
LOG.info("Start to collect and delete old version data by thread {}", threadId);
for (Entity.EntityType entityType : Entity.EntityType.values()) {
long deletedCount = Long.MAX_VALUE;
LOG.info(
LOG.debug(
"Try to softly delete {} old version data that has been over retention count {}",
entityType,
versionRetentionCount);
Expand All @@ -109,7 +109,7 @@ public void collectAndClean() {
} catch (Exception e) {
LOG.error("Thread {} failed to collect and clean garbage.", threadId, e);
} finally {
LOG.info("Thread {} finish to collect garbage.", threadId);
LOG.debug("Thread {} finish to collect garbage.", threadId);
}
}

Expand Down