Skip to content

[Bug](materialized-view) fix loaddb analyze failed on MaterializedIndexMeta#23442

Merged
BiteTheDDDDt merged 3 commits intoapache:masterfrom
BiteTheDDDDt:fix_0824
Aug 28, 2023
Merged

[Bug](materialized-view) fix loaddb analyze failed on MaterializedIndexMeta#23442
BiteTheDDDDt merged 3 commits intoapache:masterfrom
BiteTheDDDDt:fix_0824

Conversation

@BiteTheDDDDt
Copy link
Contributor

Proposed changes

     2023-08-24 17:49:29,584 WARN (main|1) [MaterializedIndexMeta.parseStmt():319] CreateMaterializedViewStmt analyze failed, mv=create materialized view trade_result as select clientid,SUM(CAST(volume AS INT)) AS activevolumn from TradeData  GROUP BY clientid, reason=
org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Unknown database 'default_cluster:test'
	at org.apache.doris.datasource.CatalogIf.lambda$getDbOrAnalysisException$4(CatalogIf.java:141) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.datasource.CatalogIf.getDbOrException(CatalogIf.java:106) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.datasource.CatalogIf.getDbOrAnalysisException(CatalogIf.java:140) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.analysis.Analyzer.resolveTableRef(Analyzer.java:803) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.analysis.FromClause.analyze(FromClause.java:132) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.analysis.SelectStmt.analyze(SelectStmt.java:485) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.analysis.CreateMaterializedViewStmt.analyze(CreateMaterializedViewStmt.java:168) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.catalog.MaterializedIndexMeta.parseStmt(MaterializedIndexMeta.java:317) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.catalog.MaterializedIndexMeta.gsonPostProcess(MaterializedIndexMeta.java:295) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.persist.gson.GsonUtils$PostProcessTypeAdapterFactory$1.read(GsonUtils.java:547) ~[doris-fe.jar:1.2-SNAPSHOT]
	at com.google.gson.Gson.fromJson(Gson.java:963) ~[gson-2.8.9.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:928) ~[gson-2.8.9.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:877) ~[gson-2.8.9.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:848) ~[gson-2.8.9.jar:?]
	at org.apache.doris.catalog.MaterializedIndexMeta.read(MaterializedIndexMeta.java:289) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.catalog.OlapTable.readFields(OlapTable.java:1336) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.catalog.Table.read(Table.java:390) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.catalog.Database.readFields(Database.java:623) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.datasource.InternalCatalog.loadDb(InternalCatalog.java:3104) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.catalog.Env.loadDb(Env.java:1788) ~[doris-fe.jar:1.2-SNAPSHOT]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
	at org.apache.doris.persist.meta.MetaReader.read(MetaReader.java:116) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.catalog.Env.loadImage(Env.java:1725) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.catalog.Env.initialize(Env.java:904) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.DorisFE.start(DorisFE.java:147) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.DorisFE.main(DorisFE.java:73) ~[doris-fe.jar:1.2-SNAPSHOT]

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.26 seconds
stream load tsv: 538 seconds loaded 74807831229 Bytes, about 132 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.2 seconds inserted 10000000 Rows, about 342K ops/s
storage size: 17162039112 Bytes

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.08 seconds
stream load tsv: 539 seconds loaded 74807831229 Bytes, about 132 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.5 seconds inserted 10000000 Rows, about 338K ops/s
storage size: 17162210077 Bytes

Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Aug 28, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.0.1-merged merge_conflict reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants