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
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 42f30d4a487 [branch-2.1][Bug] test suite test_table_options may cause
NPE in FE #39457 (#39509) (#40018)
42f30d4a487 is described below
commit 42f30d4a487b484b1c97780b97be8bec35c093ba
Author: wangbo <[email protected]>
AuthorDate: Wed Aug 28 14:17:00 2024 +0800
[branch-2.1][Bug] test suite test_table_options may cause NPE in FE #39457
(#39509) (#40018)
## Proposed changes
pick #39509
Co-authored-by: Vallish Pai <[email protected]>
---
.../java/org/apache/doris/tablefunction/MetadataGenerator.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
index 0c928fd838b..c8105a81dcf 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
@@ -1105,6 +1105,15 @@ public class MetadataGenerator {
CatalogIf catalog =
Env.getCurrentEnv().getCatalogMgr().getCatalog(clg);
List<TRow> dataBatch = Lists.newArrayList();
DatabaseIf database = catalog.getDbNullable(dbId);
+ if (database == null) {
+ // BE gets the database id list from FE and then invokes this
interface
+ // per database. there is a chance that in between database can be
dropped.
+ // so need to handle database not exist case and return ok so that
BE continue the
+ // loop with next database.
+ result.setDataBatch(dataBatch);
+ result.setStatus(new TStatus(TStatusCode.OK));
+ return result;
+ }
List<TableIf> tables = database.getTables();
if (catalog instanceof InternalCatalog) {
tablePropertiesForInternalCatalog(currentUserIdentity, catalog,
database, tables, dataBatch);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]