You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/03/12 14:52:27 UTC
(doris) branch branch-2.1 updated (6acdd9cd481 -> 6d2924668e3)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a change to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
from 6acdd9cd481 The issue introduced by the recently added auto-increment column works fine on a single node but may result in discontinuous auto-increment IDs when running on a cluster. This PR has been modified to check for the uniqueness of the auto-increment column values instead of checking for equality to a fixed value. (#32115)
new 84af8e0a53e [enhance](mtmv)mtmv support hive default partition (#32051)
new 5da7cd0fba2 [bugfix](becore) has to use value to capture lambda value to avoid core during callback (#32132)
new fa111c371b9 [Chore](top-n) check runtime predicate inited when scan operator open (#32140)
new 6d2924668e3 [fix](audit-loader) fix invalid token check logic (#32095)
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
be/src/olap/tablet_reader.cpp | 2 +
be/src/runtime/runtime_predicate.h | 2 +-
be/src/vec/sink/writer/vtablet_writer.cpp | 10 +-
.../org/apache/doris/catalog/PartitionInfo.java | 3 +
.../doris/datasource/hive/HMSExternalTable.java | 6 +-
.../org/apache/doris/httpv2/rest/LoadAction.java | 7 +-
.../org/apache/doris/load/loadv2/TokenManager.java | 61 +++++++++--
.../apache/doris/service/FrontendServiceImpl.java | 28 ++++--
gensrc/thrift/FrontendService.thrift | 2 +
.../test_hive_default_mtmv.out} | 10 +-
.../suites/mtmv_p0/test_hive_default_mtmv.groovy | 111 +++++++++++++++++++++
11 files changed, 214 insertions(+), 28 deletions(-)
copy regression-test/data/{datatype_p0/decimalv3/test_decimalv3_key/test_decimalv3_key.out => mtmv_p0/test_hive_default_mtmv.out} (57%)
create mode 100644 regression-test/suites/mtmv_p0/test_hive_default_mtmv.groovy
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
(doris) 02/04: [bugfix](becore) has to use value to capture lambda value to avoid core during callback (#32132)
Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 5da7cd0fba270f166874b4284cda79abe6b547db
Author: yiguolei <67...@qq.com>
AuthorDate: Tue Mar 12 21:17:07 2024 +0800
[bugfix](becore) has to use value to capture lambda value to avoid core during callback (#32132)
Co-authored-by: yiguolei <yi...@gmail.com>
---
be/src/vec/sink/writer/vtablet_writer.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/be/src/vec/sink/writer/vtablet_writer.cpp b/be/src/vec/sink/writer/vtablet_writer.cpp
index bfac8e2e7a9..042f736861f 100644
--- a/be/src/vec/sink/writer/vtablet_writer.cpp
+++ b/be/src/vec/sink/writer/vtablet_writer.cpp
@@ -357,9 +357,10 @@ Status VNodeChannel::init(RuntimeState* state) {
_cur_add_block_request->set_eos(false);
// add block closure
+ // Has to using value to capture _task_exec_ctx because tablet writer may destroyed during callback.
_send_block_callback = WriteBlockCallback<PTabletWriterAddBlockResult>::create_shared();
- _send_block_callback->addFailedHandler([this](bool is_last_rpc) {
- auto ctx_lock = _task_exec_ctx.lock();
+ _send_block_callback->addFailedHandler([&, task_exec_ctx = _task_exec_ctx](bool is_last_rpc) {
+ auto ctx_lock = task_exec_ctx.lock();
if (ctx_lock == nullptr) {
return;
}
@@ -367,8 +368,9 @@ Status VNodeChannel::init(RuntimeState* state) {
});
_send_block_callback->addSuccessHandler(
- [this](const PTabletWriterAddBlockResult& result, bool is_last_rpc) {
- auto ctx_lock = _task_exec_ctx.lock();
+ [&, task_exec_ctx = _task_exec_ctx](const PTabletWriterAddBlockResult& result,
+ bool is_last_rpc) {
+ auto ctx_lock = task_exec_ctx.lock();
if (ctx_lock == nullptr) {
return;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
(doris) 03/04: [Chore](top-n) check runtime predicate inited when scan operator open (#32140)
Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit fa111c371b9afb071ffe27c07221bf5bf5d499f7
Author: Pxl <px...@qq.com>
AuthorDate: Tue Mar 12 22:39:58 2024 +0800
[Chore](top-n) check runtime predicate inited when scan operator open (#32140)
check runtime predicate inited when scan operator open
---
be/src/olap/tablet_reader.cpp | 2 ++
be/src/runtime/runtime_predicate.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/be/src/olap/tablet_reader.cpp b/be/src/olap/tablet_reader.cpp
index f0229431b7b..1cecd56a82a 100644
--- a/be/src/olap/tablet_reader.cpp
+++ b/be/src/olap/tablet_reader.cpp
@@ -578,6 +578,8 @@ void TabletReader::_init_conditions_param_except_leafnode_of_andnode(
for (int id : read_params.topn_filter_source_node_ids) {
auto& runtime_predicate =
read_params.runtime_state->get_query_ctx()->get_runtime_predicate(id);
+ DCHECK(runtime_predicate.inited())
+ << "runtime predicate not inited, source_node_id=" << id;
runtime_predicate.set_tablet_schema(_tablet_schema);
}
}
diff --git a/be/src/runtime/runtime_predicate.h b/be/src/runtime/runtime_predicate.h
index ec5b9612cbc..fcfc9db7021 100644
--- a/be/src/runtime/runtime_predicate.h
+++ b/be/src/runtime/runtime_predicate.h
@@ -53,7 +53,7 @@ public:
void set_tablet_schema(TabletSchemaSPtr tablet_schema) {
std::unique_lock<std::shared_mutex> wlock(_rwlock);
- if (_tablet_schema) {
+ if (_tablet_schema || !_inited) {
return;
}
_tablet_schema = tablet_schema;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
(doris) 01/04: [enhance](mtmv)mtmv support hive default partition (#32051)
Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 84af8e0a53e499185d2fa97d362646687ed5d004
Author: zhangdong <49...@qq.com>
AuthorDate: Tue Mar 12 18:59:39 2024 +0800
[enhance](mtmv)mtmv support hive default partition (#32051)
---
.../org/apache/doris/catalog/PartitionInfo.java | 3 +
.../doris/datasource/hive/HMSExternalTable.java | 6 +-
.../data/mtmv_p0/test_hive_default_mtmv.out | 12 +++
.../suites/mtmv_p0/test_hive_default_mtmv.groovy | 111 +++++++++++++++++++++
4 files changed, 127 insertions(+), 5 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionInfo.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionInfo.java
index b7dcba3bf96..70aee07fad2 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionInfo.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionInfo.java
@@ -20,6 +20,7 @@ package org.apache.doris.catalog;
import org.apache.doris.analysis.DateLiteral;
import org.apache.doris.analysis.Expr;
import org.apache.doris.analysis.MaxLiteral;
+import org.apache.doris.analysis.NullLiteral;
import org.apache.doris.analysis.PartitionDesc;
import org.apache.doris.analysis.PartitionValue;
import org.apache.doris.analysis.SinglePartitionDesc;
@@ -374,6 +375,8 @@ public class PartitionInfo implements Writable {
return PartitionValue.MAX_VALUE;
} else if (expr instanceof DateLiteral) {
return new PartitionValue(expr.getStringValue());
+ } else if (expr instanceof NullLiteral) {
+ return new PartitionValue("NULL", true);
} else {
return new PartitionValue(expr.getRealValue().toString());
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
index 47b684c264b..50eac67deff 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
@@ -105,7 +105,6 @@ public class HMSExternalTable extends ExternalTable implements MTMVRelatedTableI
private static final String USE_HIVE_SYNC_PARTITION = "use_hive_sync_partition";
-
static {
SUPPORTED_HIVE_FILE_FORMATS = Sets.newHashSet();
SUPPORTED_HIVE_FILE_FORMATS.add("org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat");
@@ -778,10 +777,7 @@ public class HMSExternalTable extends ExternalTable implements MTMVRelatedTableI
.getMetaStoreCache((HMSExternalCatalog) getCatalog());
HiveMetaStoreCache.HivePartitionValues hivePartitionValues = cache.getPartitionValues(
getDbName(), getName(), getPartitionColumnTypes());
-
- return hivePartitionValues.getIdToPartitionItem().entrySet().stream()
- .filter(entry -> !entry.getValue().isDefaultPartition())
- .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
+ return hivePartitionValues.getIdToPartitionItem();
}
@Override
diff --git a/regression-test/data/mtmv_p0/test_hive_default_mtmv.out b/regression-test/data/mtmv_p0/test_hive_default_mtmv.out
new file mode 100644
index 00000000000..e8e078dd6b9
--- /dev/null
+++ b/regression-test/data/mtmv_p0/test_hive_default_mtmv.out
@@ -0,0 +1,12 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !test --
+1 1 2020 1
+2 2 2020 \N
+
+-- !null --
+2 2 2020 \N
+
+-- !1 --
+1 1 2020 1
+2 2 2020 \N
+
diff --git a/regression-test/suites/mtmv_p0/test_hive_default_mtmv.groovy b/regression-test/suites/mtmv_p0/test_hive_default_mtmv.groovy
new file mode 100644
index 00000000000..abc3f950ef8
--- /dev/null
+++ b/regression-test/suites/mtmv_p0/test_hive_default_mtmv.groovy
@@ -0,0 +1,111 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("test_hive_default_mtmv", "p0,external,hive,external_docker,external_docker_hive") {
+ String enabled = context.config.otherConfigs.get("enableHiveTest")
+ if (enabled == null || !enabled.equalsIgnoreCase("true")) {
+ logger.info("diable Hive test.")
+ return;
+ }
+ // prepare data in hive
+ def hive_database = "mtmv_default_partition_db"
+ def hive_table = "test_hive_default_mtmv_t1"
+
+ def drop_table_str = """ drop table if exists ${hive_database}.${hive_table} """
+ def drop_database_str = """ drop database if exists ${hive_database}"""
+ def create_database_str = """ create database ${hive_database}"""
+ def create_table_str = """ CREATE TABLE ${hive_database}.${hive_table} (
+ user_id INT,
+ num INT
+ )
+ partitioned by(year int,month int)
+ STORED AS ORC;
+ """
+
+ def insert_str1 = """
+ insert into ${hive_database}.${hive_table} PARTITION(year=2020,month) values(1,1,1);
+ """
+ def insert_str2 = """
+ insert into ${hive_database}.${hive_table} PARTITION(year=2020,month) values(2,2,null);
+ """
+
+ logger.info("hive sql: " + drop_table_str)
+ hive_docker """ ${drop_table_str} """
+ logger.info("hive sql: " + drop_database_str)
+ hive_docker """ ${drop_database_str} """
+ logger.info("hive sql: " + create_database_str)
+ hive_docker """ ${create_database_str}"""
+ logger.info("hive sql: " + create_table_str)
+ hive_docker """ ${create_table_str} """
+ logger.info("hive sql: " + insert_str1)
+ hive_docker """ ${insert_str1} """
+ logger.info("hive sql: " + insert_str2)
+ hive_docker """ ${insert_str2} """
+
+
+ // prepare catalog
+ String hms_port = context.config.otherConfigs.get("hms_port")
+ String catalog_name = "hive_default_mtmv_test_catalog"
+ String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
+
+ sql """drop catalog if exists ${catalog_name}"""
+ sql """create catalog if not exists ${catalog_name} properties (
+ "type"="hms",
+ 'hive.metastore.uris' = 'thrift://${externalEnvIp}:${hms_port}'
+ );"""
+
+ order_qt_test "SELECT * FROM ${catalog_name}.${hive_database}.${hive_table} order by num"
+
+
+ // prepare mtmv
+ def mvName = "test_hive_default_mtmv"
+ def dbName = "regression_test_mtmv_p0"
+ sql """drop materialized view if exists ${mvName};"""
+
+ sql """
+ CREATE MATERIALIZED VIEW ${mvName}
+ BUILD DEFERRED REFRESH AUTO ON MANUAL
+ partition by(`month`)
+ DISTRIBUTED BY RANDOM BUCKETS 2
+ PROPERTIES ('replication_num' = '1')
+ AS
+ SELECT user_id,num,year,month FROM ${catalog_name}.${hive_database}.${hive_table};
+ """
+ def showPartitionsResult = sql """show partitions from ${mvName}"""
+ logger.info("showPartitionsResult: " + showPartitionsResult.toString())
+ assertTrue(showPartitionsResult.toString().contains("p_NULL"))
+ assertTrue(showPartitionsResult.toString().contains("p_1"))
+
+ sql """
+ REFRESH MATERIALIZED VIEW ${mvName} partitions(p_NULL);
+ """
+ def jobName = getJobName(dbName, mvName);
+ waitingMTMVTaskFinished(jobName)
+ order_qt_null "SELECT * FROM ${mvName} order by num"
+
+ sql """
+ REFRESH MATERIALIZED VIEW ${mvName} partitions(p_1);
+ """
+ waitingMTMVTaskFinished(jobName)
+ order_qt_1 "SELECT * FROM ${mvName} order by num"
+
+ sql """drop materialized view if exists ${mvName};"""
+
+ sql """drop catalog if exists ${catalog_name}"""
+
+}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
(doris) 04/04: [fix](audit-loader) fix invalid token check logic (#32095)
Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 6d2924668e31616b694f82b11409f42dbdb63c23
Author: Mingyu Chen <mo...@163.com>
AuthorDate: Tue Mar 12 22:44:30 2024 +0800
[fix](audit-loader) fix invalid token check logic (#32095)
The check of the token should be forwarded to Master FE.
I add a new RPC method `checkToken()` in Frontend for this logic.
Otherwise, after enable the audit loader, the log from non-master FE can not be loaded to audit table
with `Invalid token` error.
---
.../org/apache/doris/httpv2/rest/LoadAction.java | 7 ++-
.../org/apache/doris/load/loadv2/TokenManager.java | 61 +++++++++++++++++++---
.../apache/doris/service/FrontendServiceImpl.java | 28 +++++++---
gensrc/thrift/FrontendService.thrift | 2 +
4 files changed, 81 insertions(+), 17 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
index 6952bd37b5c..6be5654a2ea 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
@@ -23,6 +23,7 @@ import org.apache.doris.catalog.Table;
import org.apache.doris.common.Config;
import org.apache.doris.common.DdlException;
import org.apache.doris.common.LoadException;
+import org.apache.doris.common.UserException;
import org.apache.doris.httpv2.entity.ResponseEntityBuilder;
import org.apache.doris.httpv2.entity.RestBaseResult;
import org.apache.doris.httpv2.exception.UnauthorizedException;
@@ -362,7 +363,11 @@ public class LoadAction extends RestBaseController {
// temporarily addressing the users' needs for audit logs.
// So this function is not widely tested under general scenario
private boolean checkClusterToken(String token) {
- return Env.getCurrentEnv().getLoadManager().getTokenManager().checkAuthToken(token);
+ try {
+ return Env.getCurrentEnv().getLoadManager().getTokenManager().checkAuthToken(token);
+ } catch (UserException e) {
+ throw new UnauthorizedException(e.getMessage());
+ }
}
// NOTE: This function can only be used for AuditlogPlugin stream load for now.
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/TokenManager.java b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/TokenManager.java
index 6443e6b2322..ca714d66b29 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/TokenManager.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/TokenManager.java
@@ -63,11 +63,6 @@ public class TokenManager {
return UUID.randomUUID().toString();
}
- // this method only will be called in master node, since stream load only send message to master.
- public boolean checkAuthToken(String token) {
- return tokenQueue.contains(token);
- }
-
public String acquireToken() throws UserException {
if (Env.getCurrentEnv().isMaster() || FeConstants.runningUnitTest) {
return tokenQueue.peek();
@@ -81,9 +76,8 @@ public class TokenManager {
}
}
- public String acquireTokenFromMaster() throws TException {
+ private String acquireTokenFromMaster() throws TException {
TNetworkAddress thriftAddress = getMasterAddress();
-
FrontendService.Client client = getClient(thriftAddress);
if (LOG.isDebugEnabled()) {
@@ -108,7 +102,7 @@ public class TokenManager {
} else {
TMySqlLoadAcquireTokenResult result = client.acquireToken();
if (result.getStatus().getStatusCode() != TStatusCode.OK) {
- throw new TException("commit failed.");
+ throw new TException("acquire token from master failed. " + result.getStatus());
}
isReturnToPool = true;
return result.getToken();
@@ -122,6 +116,57 @@ public class TokenManager {
}
}
+ /**
+ * Check if the token is valid.
+ * If this is not Master FE, will send the request to Master FE.
+ */
+ public boolean checkAuthToken(String token) throws UserException {
+ if (Env.getCurrentEnv().isMaster() || FeConstants.runningUnitTest) {
+ return tokenQueue.contains(token);
+ } else {
+ try {
+ return checkTokenFromMaster(token);
+ } catch (TException e) {
+ LOG.warn("check token error", e);
+ throw new UserException("Check token from master failed", e);
+ }
+ }
+ }
+
+ private boolean checkTokenFromMaster(String token) throws TException {
+ TNetworkAddress thriftAddress = getMasterAddress();
+ FrontendService.Client client = getClient(thriftAddress);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Send check token to Master {}", thriftAddress);
+ }
+
+ boolean isReturnToPool = false;
+ try {
+ boolean result = client.checkToken(token);
+ isReturnToPool = true;
+ return result;
+ } catch (TTransportException e) {
+ boolean ok = ClientPool.frontendPool.reopen(client, thriftTimeoutMs);
+ if (!ok) {
+ throw e;
+ }
+ if (e.getType() == TTransportException.TIMED_OUT) {
+ throw e;
+ } else {
+ boolean result = client.checkToken(token);
+ isReturnToPool = true;
+ return result;
+ }
+ } finally {
+ if (isReturnToPool) {
+ ClientPool.frontendPool.returnObject(thriftAddress, client);
+ } else {
+ ClientPool.frontendPool.invalidateObject(thriftAddress, client);
+ }
+ }
+ }
+
private TNetworkAddress getMasterAddress() throws TException {
Env.getCurrentEnv().checkReadyOrThrowTException();
diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index 97b6f52e331..7f2b0db8c07 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -1063,12 +1063,6 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
}
- private void checkToken(String token) throws AuthenticationException {
- if (!Env.getCurrentEnv().getLoadManager().getTokenManager().checkAuthToken(token)) {
- throw new AuthenticationException("Un matched cluster token.");
- }
- }
-
private void checkPassword(String user, String passwd, String clientIp)
throws AuthenticationException {
final String fullUserName = ClusterNamespace.getNameFromFullName(user);
@@ -1133,7 +1127,9 @@ public class FrontendServiceImpl implements FrontendService.Iface {
request.getTbl(),
request.getUserIp(), PrivPredicate.LOAD);
} else {
- checkToken(request.getToken());
+ if (!checkToken(request.getToken())) {
+ throw new AuthenticationException("Invalid token: " + request.getToken());
+ }
}
// check label
@@ -1344,7 +1340,9 @@ public class FrontendServiceImpl implements FrontendService.Iface {
if (request.isSetAuthCode()) {
// CHECKSTYLE IGNORE THIS LINE
} else if (request.isSetToken()) {
- checkToken(request.getToken());
+ if (!checkToken(request.getToken())) {
+ throw new AuthenticationException("Invalid token: " + request.getToken());
+ }
} else {
// refactoring it
if (CollectionUtils.isNotEmpty(request.getTbls())) {
@@ -2406,6 +2404,20 @@ public class FrontendServiceImpl implements FrontendService.Iface {
return result;
}
+ @Override
+ public boolean checkToken(String token) {
+ String clientAddr = getClientAddrAsString();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("receive check token request from client: {}", clientAddr);
+ }
+ try {
+ return Env.getCurrentEnv().getLoadManager().getTokenManager().checkAuthToken(token);
+ } catch (Throwable e) {
+ LOG.warn("catch unknown result.", e);
+ return false;
+ }
+ }
+
@Override
public TCheckAuthResult checkAuth(TCheckAuthRequest request) throws TException {
String clientAddr = getClientAddrAsString();
diff --git a/gensrc/thrift/FrontendService.thrift b/gensrc/thrift/FrontendService.thrift
index 176199325c7..17bc432d80a 100644
--- a/gensrc/thrift/FrontendService.thrift
+++ b/gensrc/thrift/FrontendService.thrift
@@ -1435,6 +1435,8 @@ service FrontendService {
TMySqlLoadAcquireTokenResult acquireToken()
+ bool checkToken(1: string token)
+
TConfirmUnusedRemoteFilesResult confirmUnusedRemoteFiles(1: TConfirmUnusedRemoteFilesRequest request)
TCheckAuthResult checkAuth(1: TCheckAuthRequest request)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org