Skip to content

Commit 8ac10ce

Browse files
authored
[#6537] improvement(core): Change the level of some log in LockManager and GarbageCollector from INFO to DEBUG (#6539)
### What changes were proposed in this pull request? Change the level of log from INFO to DEBUG. ### Why are the changes needed? As the log will be show periodically, in order to reduce the size of the Gravitino server log, we need to change it from INFO to DEBUG. Fix: #6537 ### Does this PR introduce _any_ user-facing change? N/A. ### How was this patch tested? Existing UTs and ITs.
1 parent 7692654 commit 8ac10ce

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

core/src/main/java/org/apache/gravitino/lock/LockManager.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ private void startDeadLockChecker() {
112112

113113
deadLockChecker.scheduleAtFixedRate(
114114
() -> {
115-
LOG.info("Start to check the dead lock...");
115+
LOG.debug("Start to check the dead lock...");
116116
checkDeadLock(treeLockRootNode);
117-
LOG.info("Finish to check the dead lock...");
117+
LOG.debug("Finish to check the dead lock...");
118118
},
119119
0,
120120
60,
@@ -161,12 +161,12 @@ private void startNodeCleaner() {
161161
lockCleaner.scheduleAtFixedRate(
162162
() -> {
163163
long nodeCount = totalNodeCount.get();
164-
LOG.info("Total tree lock node count: {}", nodeCount);
164+
LOG.debug("Total tree lock node count: {}", nodeCount);
165165
// If the total node count is greater than the maxTreeNodeInMemory * 0.5, we will do the
166166
// clear up in case of the memory explosion.
167167
if (nodeCount > maxTreeNodeInMemory * 0.5) {
168168
StopWatch watch = StopWatch.createStarted();
169-
LOG.trace("Start to clean up the stale tree lock nodes...");
169+
LOG.info("Start to clean up the stale tree lock nodes...");
170170
treeLockRootNode
171171
.getAllChildren()
172172
.forEach(child -> evictStaleNodes(child, treeLockRootNode));

core/src/main/java/org/apache/gravitino/storage/relational/RelationalGarbageCollector.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ public void start() {
7171
@VisibleForTesting
7272
public void collectAndClean() {
7373
long threadId = Thread.currentThread().getId();
74-
LOG.info("Thread {} start to collect garbage...", threadId);
74+
LOG.debug("Thread {} start to collect garbage...", threadId);
7575

7676
try {
77-
LOG.info("Start to collect and delete legacy data by thread {}", threadId);
77+
LOG.debug("Start to collect and delete legacy data by thread {}", threadId);
7878
long legacyTimeline = System.currentTimeMillis() - storeDeleteAfterTimeMillis;
7979
for (Entity.EntityType entityType : Entity.EntityType.values()) {
8080
long deletedCount = Long.MAX_VALUE;
81-
LOG.info(
81+
LOG.debug(
8282
"Try to physically delete {} legacy data that has been marked deleted before {}",
8383
entityType,
8484
legacyTimeline);
@@ -94,7 +94,7 @@ public void collectAndClean() {
9494
LOG.info("Start to collect and delete old version data by thread {}", threadId);
9595
for (Entity.EntityType entityType : Entity.EntityType.values()) {
9696
long deletedCount = Long.MAX_VALUE;
97-
LOG.info(
97+
LOG.debug(
9898
"Try to softly delete {} old version data that has been over retention count {}",
9999
entityType,
100100
versionRetentionCount);
@@ -109,7 +109,7 @@ public void collectAndClean() {
109109
} catch (Exception e) {
110110
LOG.error("Thread {} failed to collect and clean garbage.", threadId, e);
111111
} finally {
112-
LOG.info("Thread {} finish to collect garbage.", threadId);
112+
LOG.debug("Thread {} finish to collect garbage.", threadId);
113113
}
114114
}
115115

0 commit comments

Comments
 (0)