This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 83b25501d76 [typo](log) Let env lock msg more distinct #27493 (#34486)
83b25501d76 is described below
commit 83b25501d761a1bb1c0dbdaac962952822f43a95
Author: yujun <[email protected]>
AuthorDate: Wed May 8 09:46:29 2024 +0800
[typo](log) Let env lock msg more distinct #27493 (#34486)
Co-authored-by: Lei Zhang <[email protected]>
---
.../src/main/java/org/apache/doris/catalog/Env.java | 18 ++++++++----------
.../org/apache/doris/datasource/InternalCatalog.java | 14 ++++++--------
2 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
index 6f3c6e303d2..50bbe3aba72 100755
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
@@ -832,12 +832,10 @@ public class Env {
while (true) {
try {
if (!lock.tryLock(Config.catalog_try_lock_timeout_ms,
TimeUnit.MILLISECONDS)) {
- if (LOG.isDebugEnabled()) {
- // to see which thread held this lock for long time.
- Thread owner = lock.getOwner();
- if (owner != null) {
- LOG.debug("catalog lock is held by: {}",
Util.dumpThread(owner, 10));
- }
+ // to see which thread held this lock for long time.
+ Thread owner = lock.getOwner();
+ if (owner != null) {
+ LOG.info("env lock is held by: {}",
Util.dumpThread(owner, 10));
}
if (mustLock) {
@@ -848,7 +846,7 @@ public class Env {
}
return true;
} catch (InterruptedException e) {
- LOG.warn("got exception while getting catalog lock", e);
+ LOG.warn("got exception while getting env lock", e);
if (mustLock) {
continue;
} else {
@@ -2607,7 +2605,7 @@ public class Env {
public void addFrontend(FrontendNodeType role, String host, int
editLogPort) throws DdlException {
if (!tryLock(false)) {
- throw new DdlException("Failed to acquire catalog lock. Try
again");
+ throw new DdlException("Failed to acquire env lock. Try again");
}
try {
Frontend fe = checkFeExist(host, editLogPort);
@@ -2653,7 +2651,7 @@ public class Env {
public void modifyFrontendHost(String nodeName, String destHost) throws
DdlException {
if (!tryLock(false)) {
- throw new DdlException("Failed to acquire catalog lock. Try
again");
+ throw new DdlException("Failed to acquire env lock. Try again");
}
try {
Frontend fe = getFeByName(nodeName);
@@ -2684,7 +2682,7 @@ public class Env {
throw new DdlException("can not drop current master node.");
}
if (!tryLock(false)) {
- throw new DdlException("Failed to acquire catalog lock. Try
again");
+ throw new DdlException("Failed to acquire env lock. Try again");
}
try {
Frontend fe = checkFeExist(host, port);
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
index f97fd41dbae..bdf091194ef 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
@@ -329,14 +329,12 @@ public class InternalCatalog implements
CatalogIf<Database> {
while (true) {
try {
if (!lock.tryLock(Config.catalog_try_lock_timeout_ms,
TimeUnit.MILLISECONDS)) {
- if (LOG.isDebugEnabled()) {
- // to see which thread held this lock for long time.
- Thread owner = lock.getOwner();
- if (owner != null) {
- // There are many catalog timeout during
regression test
- // And this timeout should not happen very often,
so it could be info log
- LOG.info("catalog lock is held by: {}",
Util.dumpThread(owner, 10));
- }
+ // to see which thread held this lock for long time.
+ Thread owner = lock.getOwner();
+ if (owner != null) {
+ // There are many catalog timeout during regression
test
+ // And this timeout should not happen very often, so
it could be info log
+ LOG.info("catalog lock is held by: {}",
Util.dumpThread(owner, 10));
}
if (mustLock) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]