[typo](log) Let env lock msg more distinct (#27493)
This commit is contained in:
@ -855,7 +855,7 @@ public class Env {
|
||||
// to see which thread held this lock for long time.
|
||||
Thread owner = lock.getOwner();
|
||||
if (owner != null) {
|
||||
LOG.info("catalog lock is held by: {}", Util.dumpThread(owner, 10));
|
||||
LOG.info("env lock is held by: {}", Util.dumpThread(owner, 10));
|
||||
}
|
||||
|
||||
if (mustLock) {
|
||||
@ -866,7 +866,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 {
|
||||
@ -2634,7 +2634,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);
|
||||
@ -2680,7 +2680,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);
|
||||
@ -2711,7 +2711,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);
|
||||
|
||||
@ -330,14 +330,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) {
|
||||
|
||||
Reference in New Issue
Block a user