Skip to content

[Improvement](mysql) support create/drop database#64043

Open
codeDing18 wants to merge 1 commit into
apache:masterfrom
codeDing18:mysql-cd
Open

[Improvement](mysql) support create/drop database#64043
codeDing18 wants to merge 1 commit into
apache:masterfrom
codeDing18:mysql-cd

Conversation

@codeDing18
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

mysql support create/drop database

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Found one blocking correctness issue. The remote MySQL DDL is executed, but the Doris external catalog cache is not invalidated or replay-logged, unlike existing Hive/Iceberg/Paimon create/drop database paths. This can leave SHOW DATABASES / getDbNullable stale on the leader until a manual refresh and can leave follower FEs stale because no edit-log replay hook runs.

Critical checkpoints:

  • Goal/test: The PR aims to support CREATE/DROP DATABASE for MySQL JDBC catalogs and adds an external regression test, but the test manually refreshes the catalog after DDL and therefore misses the immediate-visibility/cache behavior expected by existing external DDL paths.
  • Scope/focus: The implementation is small and focused, but it bypasses ExternalCatalog metadataOps post-DDL cache/replay handling.
  • Concurrency/lifecycle: No new concurrency primitives; the issue is metadata cache lifecycle/invalidating initialized catalog state.
  • Configuration/compatibility/protocol: No new config or FE-BE protocol/storage compatibility concerns.
  • Parallel paths: Existing external metadata paths call afterCreateDb()/afterDropDb() and log create/drop DB info for replay; the new PluginDrivenExternalCatalog override does neither.
  • Testing: Regression covers remote DDL after manual refresh, but not immediate visibility or stale-cache/follower replay behavior.
  • Observability/performance: No additional observability issue found; performance impact is negligible.

User focus: No additional user-provided review focus was present.

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

I found one blocking correctness issue in the latest revision. The PR goal is clear and the MySQL JDBC CREATE/DROP SQL path is small, and the regression test covers the happy path plus basic IF EXISTS/IF NOT EXISTS behavior. However, the new edit-log replay implementation for plugin-driven catalogs now performs external catalog initialization during replay, which is not safe for FE journal replay or restart.

Critical checkpoint conclusions:

  • Goal/test: Adds CREATE/DROP DATABASE support for plugin-driven JDBC/MySQL catalogs; covered by a JDBC regression test, but the multi-FE replay path is not covered.
  • Scope: Mostly focused, but replay behavior diverges from the existing ExternalCatalog replay contract.
  • Concurrency/lifecycle: No new explicit shared mutable state, but replay lifecycle is problematic because it may initialize connector resources and rebuild remote metadata while applying journal entries.
  • Configuration/compatibility: No new config or storage format; uses existing CreateDbInfo/DropDbInfo records.
  • Parallel paths: Existing ExternalCatalog replay avoids remote initialization; this new plugin-driven override should preserve that behavior.
  • Tests: Functional test exists for single-FE create/drop, but no failover/replay test covers the new persistence path.
  • Observability/performance: Logging is adequate; replay currently does unnecessary remote IO.
  • Transaction/persistence: Blocking issue below: journal replay must be local and equivalent, not dependent on external service availability.

User focus: no additional user-provided review focus was specified.

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

I found a blocking persistence issue in the new plugin-driven external catalog DDL path. The remote CREATE/DROP succeeds before the FE edit log is written, but the edit-log failure is caught and only logged, so the client can receive success for a metadata mutation that followers and restarted FEs will never replay. This violates the EditLog fatal-error rule and can leave FEs with divergent catalog caches after failover/restart.

Critical checkpoints:

  • Goal/test: the PR adds MySQL JDBC create/drop database support and a basic regression test, but the test does not cover edit-log failure/replay/failover behavior.
  • Scope: the main functional change is small, but the custom edit-log handling diverges from the existing ExternalCatalog path.
  • Concurrency: no new shared mutable state or locking issue found beyond cache invalidation/replay behavior already raised in existing threads.
  • Lifecycle: replay no longer forces remote initialization, addressing the existing replay context; no additional lifecycle issue found.
  • Configuration/compatibility: no new config or incompatible storage/protocol format found.
  • Parallel paths: the existing ExternalCatalog create/drop path does not swallow log failures; plugin-driven path should follow that invariant.
  • Tests: added regression covers happy path and simple errors only; no replay/failover/log-failure coverage.
  • Observability: logs exist, but logging is not sufficient for durable-log failure.
  • Persistence: blocking issue found; edit-log failures are swallowed.

User focus: no additional user-provided review focus.

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Review summary: no additional blocking issues found in this pass beyond the existing inline threads, which cover cache convergence, replay avoiding remote IO, and edit-log failure handling for plugin-driven catalog CREATE/DROP DATABASE.

Critical checkpoint conclusions:

  • Goal and tests: The PR adds MySQL JDBC CREATE/DROP DATABASE support through the plugin-driven external catalog and includes an external JDBC regression case for create, duplicate create, drop, missing drop, and IF EXISTS/IF NOT EXISTS behavior. The current code accomplishes the intended path for MySQL.
  • Scope and clarity: The change is focused on the connector metadata, MySQL SQL generation, catalog DDL delegation/replay, and one regression test.
  • Concurrency: No new shared mutable state or lock ordering was introduced. The cache operations use existing ExternalCatalog cache invalidation paths.
  • Lifecycle/replay: Current replay methods avoid initializing the connector or doing remote IO when the catalog is not initialized, matching the external catalog replay constraint.
  • Configuration: No new configuration items were added.
  • Compatibility: No storage format, thrift, or function symbol compatibility concern was found. Unsupported JDBC database types still fail through the existing connector exception path.
  • Parallel paths: The implementation targets plugin-driven JDBC/MySQL. Other JDBC clients remain unsupported unless they override the new SQL generation hooks.
  • Error handling and persistence: The current head no longer swallows edit-log failures in this file; durable-log failure is allowed to propagate.
  • Test coverage: The added regression test covers the main MySQL behavior. I did not run tests in this review environment.
  • Observability: Existing INFO logs include catalog and database names for the new DDL operations and are sufficient for this scope.
  • Transactions/persistence/data correctness: The only persisted metadata state is the external catalog cache invalidation replay record; write and replay paths are present and local replay is side-effect-free against the remote source.
  • Performance: No hot-path performance issue was identified; DDL paths perform one remote DDL call and a cache invalidation.

User focus: .opencode-review.tVlAf6/review_focus.txt says there was no additional user-provided review focus, so no extra focus-specific issue was found.

@codeDing18
Copy link
Copy Markdown
Contributor Author

run buildall

@codeDing18
Copy link
Copy Markdown
Contributor Author

run external

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/144) 🎉
Increment coverage report
Complete coverage report

1 similar comment
@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/144) 🎉
Increment coverage report
Complete coverage report

@codeDing18
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/24) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/740) 🎉
Increment coverage report
Complete coverage report

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

@codeDing18
Copy link
Copy Markdown
Contributor Author

run nonConcurrent

@codeDing18
Copy link
Copy Markdown
Contributor Author

run cloud_p0

@codeDing18
Copy link
Copy Markdown
Contributor Author

run external

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 29266 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 4cdacde271fedf87511f9530e6e34855e04df923, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17693	4109	4019	4019
q2	q3	10751	1364	836	836
q4	4684	478	344	344
q5	7534	879	582	582
q6	179	168	137	137
q7	765	836	663	663
q8	9342	1726	1706	1706
q9	6335	4509	4503	4503
q10	6768	1815	1557	1557
q11	445	268	247	247
q12	671	435	291	291
q13	18207	3386	2752	2752
q14	275	259	242	242
q15	q16	827	769	707	707
q17	1291	938	915	915
q18	6920	5678	5490	5490
q19	1489	1339	1054	1054
q20	524	398	269	269
q21	6234	2692	2644	2644
q22	459	378	308	308
Total cold run time: 101393 ms
Total hot run time: 29266 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4888	4753	4762	4753
q2	q3	5132	5233	4749	4749
q4	2124	2221	1401	1401
q5	4931	4729	4695	4695
q6	231	179	129	129
q7	1919	1831	1543	1543
q8	2390	2011	1930	1930
q9	7375	7375	7355	7355
q10	4697	4659	4204	4204
q11	529	385	355	355
q12	732	741	525	525
q13	3011	3296	2796	2796
q14	268	279	268	268
q15	q16	670	704	615	615
q17	1271	1245	1233	1233
q18	7420	7175	6906	6906
q19	1149	1101	1087	1087
q20	2213	2217	1961	1961
q21	5265	4568	4455	4455
q22	516	466	398	398
Total cold run time: 56731 ms
Total hot run time: 51358 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169288 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 4cdacde271fedf87511f9530e6e34855e04df923, data reload: false

query5	4326	644	484	484
query6	452	193	177	177
query7	4858	565	296	296
query8	377	215	212	212
query9	8760	4018	3978	3978
query10	471	311	261	261
query11	5844	2357	2228	2228
query12	159	104	95	95
query13	1265	572	480	480
query14	6421	5396	5093	5093
query14_1	4413	4410	4385	4385
query15	210	198	176	176
query16	1032	457	474	457
query17	1133	737	607	607
query18	2723	488	355	355
query19	215	190	145	145
query20	113	109	107	107
query21	222	139	121	121
query22	13610	13532	13304	13304
query23	17424	16623	16239	16239
query23_1	16337	16372	16306	16306
query24	7654	1764	1301	1301
query24_1	1299	1312	1313	1312
query25	538	440	380	380
query26	1281	324	171	171
query27	2677	570	337	337
query28	4412	2008	1973	1973
query29	1060	622	476	476
query30	307	242	190	190
query31	1130	1063	949	949
query32	101	64	57	57
query33	516	318	258	258
query34	1165	1155	627	627
query35	756	775	697	697
query36	1393	1375	1222	1222
query37	148	107	92	92
query38	3204	3177	3030	3030
query39	926	937	891	891
query39_1	882	886	878	878
query40	216	123	105	105
query41	68	64	63	63
query42	98	96	93	93
query43	322	325	271	271
query44	
query45	195	188	173	173
query46	1066	1260	769	769
query47	2376	2425	2342	2342
query48	392	412	297	297
query49	629	468	346	346
query50	1020	342	262	262
query51	4423	4318	4306	4306
query52	87	89	77	77
query53	240	266	188	188
query54	270	237	206	206
query55	82	75	70	70
query56	228	224	219	219
query57	1433	1434	1359	1359
query58	282	209	200	200
query59	1556	1609	1424	1424
query60	276	248	228	228
query61	157	150	153	150
query62	695	677	593	593
query63	233	184	183	183
query64	2533	776	612	612
query65	
query66	1774	462	343	343
query67	29680	29655	29579	29579
query68	
query69	426	306	256	256
query70	954	947	938	938
query71	295	220	199	199
query72	3031	2663	2346	2346
query73	869	817	441	441
query74	5129	4990	4759	4759
query75	2643	2565	2225	2225
query76	2319	1156	756	756
query77	371	372	283	283
query78	12478	12536	11792	11792
query79	1448	1060	738	738
query80	593	490	417	417
query81	449	274	246	246
query82	561	154	122	122
query83	349	282	245	245
query84	259	141	113	113
query85	873	524	434	434
query86	362	302	290	290
query87	3381	3397	3254	3254
query88	3609	2742	2762	2742
query89	433	374	328	328
query90	1897	180	173	173
query91	176	164	164	164
query92	66	65	59	59
query93	1494	1526	860	860
query94	538	337	315	315
query95	680	475	355	355
query96	1082	774	350	350
query97	2714	2739	2587	2587
query98	208	224	207	207
query99	1154	1185	1037	1037
Total cold run time: 251343 ms
Total hot run time: 169288 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/740) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/741) 🎉
Increment coverage report
Complete coverage report

1 similar comment
@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/741) 🎉
Increment coverage report
Complete coverage report

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Review result: no additional blocking issues found in the current head diff.

Critical checkpoint conclusions:

  • Goal and tests: The PR adds JDBC/MySQL database CREATE/DROP support through the plugin-driven external catalog path, with a JDBC regression case covering create, drop, IF EXISTS, IF NOT EXISTS, and expected duplicate/missing errors. The current code appears to implement that goal.
  • Scope: The change is small and focused on connector metadata, MySQL SQL generation, plugin-driven catalog DDL forwarding/cache invalidation, and one regression test.
  • Concurrency/locking: I did not find new catalog/database/table lock usage or shared mutable state access beyond existing ExternalCatalog cache methods. The remote JDBC calls are not introduced under FE metadata locks in this path.
  • Lifecycle/replay: Current replay methods avoid remote initialization/IO and only adjust initialized local caches, matching the no-remote-call replay requirement. This addresses the already-known replay concern and I am not re-raising it.
  • Configuration/compatibility: No new config items or storage/protocol format changes are introduced. Existing CreateDbInfo/DropDbInfo journal types are reused.
  • Parallel paths: Existing external metadata-ops paths already handle their catalog implementations; this PR adds the plugin-driven/JDBC path. Unsupported plugin connectors still fail via connector defaults.
  • Special conditions: IF EXISTS / IF NOT EXISTS are forwarded into generated MySQL SQL. DROP force is not specially implemented, but MySQL DROP DATABASE already removes the schema contents, so I did not identify a correctness gap there.
  • Test coverage: The new regression test covers the core MySQL JDBC behavior. I did not run the regression suite in this review runner.
  • Persistence and failover: The current head no longer swallows edit-log failures and has write-side edit logs plus matching replay invalidation/removal. The previously raised persistence concerns are already tracked in existing threads and appear resolved in the current diff.
  • Observability/performance: Added INFO logs are limited to explicit DDL operations, and no hot-path performance issue was identified.

User focus points: No additional user-provided review focus was specified.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Summary: I found one blocking issue in the new plugin-driven JDBC DROP DATABASE path. Existing review context was considered; this is distinct from the earlier cache invalidation, replay IO, and edit-log failure comments.

Critical checkpoint conclusions:

  • Goal/test: The PR adds JDBC create/drop database support and a MySQL regression test, but the implementation does not correctly handle external-catalog local-vs-remote database name resolution in non-default naming modes, and the test only covers the default unmapped path.
  • Scope/focus: The code is small and focused.
  • Concurrency/lifecycle: No new concurrent shared state or special lifecycle issue found beyond existing catalog initialization/replay paths already reviewed.
  • Persistence/replay: Current head no longer swallows edit-log failures and replay avoids remote initialization; no new distinct persistence issue found.
  • Compatibility/configuration: No new config or storage/protocol compatibility issue found.
  • Parallel paths: Existing Hive/Iceberg/Paimon external drop paths resolve the local Doris database to the remote name before dropping; the new plugin-driven path does not.
  • Tests: Missing coverage for lower_case_database_names / meta_names_mapping behavior, which is where the issue reproduces. The user provided no additional focus points, so there were no extra focus-specific issues to address.

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

I found one remaining blocking issue in the added regression test. Existing review threads already cover the plugin-driven catalog cache/persistence/replay/remote-name concerns, so I did not duplicate those.

Critical checkpoint conclusions:

  • Goal/test proof: the PR aims to support JDBC MySQL CREATE/DROP DATABASE through plugin-driven external catalogs and adds a regression test. The implementation path has targeted coverage, but the new test currently contains a cleanup statement that will fail after the catalog was already dropped.
  • Scope/focus: the code changes are small and focused on JDBC schema DDL and plugin-driven external catalog bridging.
  • Concurrency/lifecycle: no new concurrent state mutation beyond existing external catalog cache invalidation paths; replay avoids remote initialization in the current head.
  • Config/compatibility: no new config or storage/protocol format compatibility concerns identified.
  • Parallel paths: existing external catalog DDL paths were checked for analogous cache/log/drop behavior; previously raised concerns are already represented in existing threads.
  • Tests: the added regression test has a deterministic functional bug in its final cleanup order and should be fixed before merge.
  • Observability/performance: no additional blocking observability or performance issues found.
  • User focus: no additional user-provided review focus was supplied.

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

I found one blocking correctness issue in the new DROP DATABASE path.

Critical checkpoint conclusions:

  • Goal/test: The PR aims to add JDBC MySQL CREATE/DROP DATABASE support with regression coverage. Basic create/drop is covered, but the lower_case_meta_names test currently encodes the buggy no-op behavior instead of catching it.
  • Scope: The change is focused, but the PluginDrivenExternalCatalog override affects all plugin-driven catalogs and must preserve external identifier mapping semantics.
  • Concurrency/lifecycle: No new shared mutable state or thread lifecycle was added; replay now avoids remote initialization, which is appropriate.
  • Configuration/compatibility: No new config or storage format. Edit-log entries reuse existing CreateDbInfo/DropDbInfo and replay hooks.
  • Parallel paths: Existing external DDL patterns use local-name cache invalidation plus remote-name resolution for DROP; the new path still misses local lookup normalization for lower_case_meta_names.
  • Tests: The new external regression covers MySQL, but the mapped-case DROP assertion is inverted and does not prove the user-visible DROP behavior.
  • Observability/performance: Added INFO logs are acceptable for DDL; no hot-path performance concern found.

User focus: No additional user-provided review focus was specified.

@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

I completed a full review of the PR files and the existing review context. I am not adding duplicate inline comments because the currently blocking findings are already covered by existing threads and still apply to this head.

Critical checkpoint conclusions:

  • Goal/test: The PR aims to support CREATE/DROP DATABASE for MySQL JDBC catalogs and adds a regression test, but the current implementation/test are not yet sufficient because the existing threads identify remaining correctness and test-cleanup failures.
  • Scope/focus: The change is small and focused on JDBC metadata plus PluginDrivenExternalCatalog, but it bypasses several established ExternalCatalog DDL semantics that existing comments already call out.
  • Concurrency/lifecycle: No new explicit concurrent data structure was introduced, but replay/lifecycle behavior is critical here; existing replay comments correctly require journal replay to remain local and avoid remote initialization.
  • Configuration: No new configuration items were added.
  • Compatibility/storage format: No storage-format compatibility issue found. Edit-log compatibility is relevant and the existing persistence/replay comments cover the necessary corrections.
  • Parallel paths: Existing external catalog DDL paths use ExternalMetadataOps hooks/edit-log replay; the plugin-driven path must preserve equivalent cache invalidation, remote-name resolution, and persistence semantics.
  • Conditional checks: The lower-case/mapped-name drop path still needs to resolve caller input to the actual local name as already raised.
  • Tests/results: A regression test is added, but an existing thread identifies a cleanup statement that can fail after dropping the catalog; another existing thread covers the lower_case_meta_names assertion behavior.
  • Observability: Logging is present and no additional observability requirement was found beyond making failures propagate correctly.
  • Transaction/persistence: Metadata persistence is a blocking area; existing comments about not swallowing edit-log failures and keeping replay local remain applicable.
  • Data writes/modifications: Remote database create/drop has non-atomic interaction with FE metadata, so cache invalidation, local/remote name resolution, and edit-log behavior must be fixed before merge.
  • FE/BE variable passing: Not applicable.
  • Performance: No additional performance issue found in the small changed path.
  • Other issues: No additional distinct issue found beyond the already-known inline threads.

User focus: No additional user-provided review focus was specified.

Please address the existing inline review threads before merge.

@codeDing18
Copy link
Copy Markdown
Contributor Author

run buildall

@codeDing18 codeDing18 force-pushed the mysql-cd branch 3 times, most recently from ebf3084 to 1282a8a Compare June 4, 2026 09:02
@codeDing18
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Automated review summary for PR 64043 at 1282a8a.

I reviewed the full current diff and the existing inline review context first, and did not find additional distinct blocking issues beyond the already-known threads. The current head appears to address the previously raised concerns around plugin-driven external catalog cache invalidation, edit-log failure propagation, replay avoiding remote initialization, and local/remote database name resolution for lower-cased metadata names.

Critical checkpoint conclusions:

  • Goal and tests: the PR adds MySQL JDBC external catalog CREATE/DROP DATABASE support and a JDBC regression covering create, duplicate create, drop, IF EXISTS/IF NOT EXISTS, mixed-case names, and lower_case_meta_names behavior.
  • Scope: the implementation is focused on JDBC/plugin-driven catalog DDL plus the minimum connector SQL hooks needed for MySQL.
  • Concurrency/lifecycle: no new explicit concurrency paths or long-held metadata locks were identified in the changed code; replay now stays local when the catalog is already initialized.
  • Configuration/compatibility: no new configuration item or incompatible storage/protocol format was added.
  • Parallel paths: existing external catalog metadataOps paths were compared; no additional required duplicate change was found for this MySQL JDBC path.
  • Error handling/persistence: current head no longer swallows edit-log failures in the reviewed create/drop path.
  • Test coverage: coverage is present for the main MySQL JDBC behavior. I did not run the regression in this Actions review environment.
  • Observability: INFO logs include catalog/database context for the new DDL operations and no additional metric need was identified.
  • User focus: no additional user-provided review focus was supplied.

Residual risk: this review was static only; the external MySQL regression should still be run in the JDBC-enabled regression environment before merge.

@codeDing18
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 29439 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 1282a8a0b1fae13d367c400b9bb8a8a691e80f48, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17675	4162	4140	4140
q2	q3	10789	1473	837	837
q4	4685	482	352	352
q5	7543	917	588	588
q6	188	179	138	138
q7	796	870	679	679
q8	9420	1596	1573	1573
q9	5814	4481	4540	4481
q10	6824	1859	1512	1512
q11	444	277	257	257
q12	630	433	298	298
q13	18143	3474	2780	2780
q14	268	259	248	248
q15	q16	830	773	703	703
q17	987	897	1001	897
q18	6920	5741	5615	5615
q19	1326	1398	1106	1106
q20	536	412	270	270
q21	6366	2897	2639	2639
q22	489	386	326	326
Total cold run time: 100673 ms
Total hot run time: 29439 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	5421	5050	5025	5025
q2	q3	4924	5425	4749	4749
q4	2139	2195	1371	1371
q5	4942	5001	4818	4818
q6	250	184	129	129
q7	1905	1734	1613	1613
q8	2598	2120	2169	2120
q9	8138	7936	7491	7491
q10	4748	4679	4235	4235
q11	562	386	350	350
q12	746	746	526	526
q13	3083	3499	2773	2773
q14	270	274	258	258
q15	q16	682	709	620	620
q17	1290	1284	1275	1275
q18	7235	7000	6932	6932
q19	1145	1154	1104	1104
q20	2238	2224	1940	1940
q21	5267	4863	4596	4596
q22	515	470	441	441
Total cold run time: 58098 ms
Total hot run time: 52366 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169626 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 1282a8a0b1fae13d367c400b9bb8a8a691e80f48, data reload: false

query5	4316	656	498	498
query6	463	204	184	184
query7	4814	571	303	303
query8	370	231	248	231
query9	8784	4004	3991	3991
query10	474	313	256	256
query11	5973	2360	2192	2192
query12	163	106	99	99
query13	1285	615	443	443
query14	6430	5431	5068	5068
query14_1	4395	4415	4397	4397
query15	206	204	188	188
query16	1007	469	454	454
query17	1140	736	606	606
query18	2535	512	370	370
query19	208	190	152	152
query20	111	109	107	107
query21	224	142	117	117
query22	13725	13591	13442	13442
query23	17517	16556	16195	16195
query23_1	16246	16345	16375	16345
query24	7600	1788	1316	1316
query24_1	1320	1327	1339	1327
query25	560	439	376	376
query26	1298	327	169	169
query27	2649	584	354	354
query28	4406	2037	2029	2029
query29	1075	595	487	487
query30	313	236	197	197
query31	1116	1070	964	964
query32	110	63	59	59
query33	527	320	267	267
query34	1184	1189	658	658
query35	754	783	679	679
query36	1392	1407	1258	1258
query37	154	103	88	88
query38	3223	3163	3047	3047
query39	938	919	902	902
query39_1	873	920	896	896
query40	223	140	102	102
query41	71	63	63	63
query42	97	96	93	93
query43	321	325	282	282
query44	
query45	205	193	183	183
query46	1106	1190	756	756
query47	2342	2393	2232	2232
query48	410	404	310	310
query49	644	472	349	349
query50	968	352	270	270
query51	4328	4288	4238	4238
query52	86	96	84	84
query53	233	280	196	196
query54	271	228	221	221
query55	82	77	69	69
query56	236	220	213	213
query57	1419	1391	1289	1289
query58	240	219	210	210
query59	1557	1669	1461	1461
query60	323	246	230	230
query61	160	155	148	148
query62	701	652	588	588
query63	232	187	186	186
query64	2593	812	627	627
query65	
query66	1791	460	346	346
query67	29079	29643	29626	29626
query68	
query69	427	320	260	260
query70	952	933	944	933
query71	301	222	217	217
query72	3109	2675	2400	2400
query73	860	811	432	432
query74	5126	4931	4771	4771
query75	2689	2589	2250	2250
query76	2356	1146	781	781
query77	364	384	297	297
query78	12515	12373	11928	11928
query79	1297	1050	798	798
query80	534	468	395	395
query81	445	282	248	248
query82	239	161	121	121
query83	273	281	242	242
query84	254	139	123	123
query85	835	521	432	432
query86	322	306	276	276
query87	3391	3367	3205	3205
query88	3637	2749	2759	2749
query89	420	385	334	334
query90	2186	172	191	172
query91	172	162	136	136
query92	61	61	59	59
query93	1462	1427	871	871
query94	538	352	321	321
query95	687	370	449	370
query96	1034	832	359	359
query97	2707	2678	2573	2573
query98	214	204	204	204
query99	1183	1172	1049	1049
Total cold run time: 250414 ms
Total hot run time: 169626 ms

@codeDing18
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 29226 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit a508cd8da9e8e6c17b205af34bda4b375371387c, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17977	4067	4011	4011
q2	q3	10774	1413	821	821
q4	4692	471	352	352
q5	7545	913	595	595
q6	182	182	137	137
q7	792	850	635	635
q8	9351	1507	1575	1507
q9	5782	4541	4560	4541
q10	6757	1797	1557	1557
q11	446	274	257	257
q12	630	432	295	295
q13	18124	3331	2778	2778
q14	264	259	238	238
q15	q16	814	776	709	709
q17	895	938	1008	938
q18	6798	5777	5493	5493
q19	1331	1154	1083	1083
q20	520	395	261	261
q21	6155	2794	2698	2698
q22	448	377	320	320
Total cold run time: 100277 ms
Total hot run time: 29226 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	5085	4712	4692	4692
q2	q3	4895	5308	4703	4703
q4	2167	2221	1403	1403
q5	4788	4803	4666	4666
q6	227	183	130	130
q7	1850	1761	1676	1676
q8	2431	2100	2102	2100
q9	7970	7775	7397	7397
q10	4720	4713	4227	4227
q11	531	383	349	349
q12	733	747	536	536
q13	3029	3352	2808	2808
q14	276	275	260	260
q15	q16	677	697	603	603
q17	1264	1253	1246	1246
q18	7235	6812	6741	6741
q19	1109	1093	1091	1091
q20	2199	2214	1971	1971
q21	5282	4565	4442	4442
q22	514	455	395	395
Total cold run time: 56982 ms
Total hot run time: 51436 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169484 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit a508cd8da9e8e6c17b205af34bda4b375371387c, data reload: false

query5	4337	638	484	484
query6	458	209	187	187
query7	4831	578	311	311
query8	384	214	210	210
query9	8789	4021	4026	4021
query10	450	316	255	255
query11	5934	2322	2240	2240
query12	161	104	99	99
query13	1314	605	438	438
query14	6413	5422	5098	5098
query14_1	4423	4421	4398	4398
query15	214	196	180	180
query16	1020	472	434	434
query17	1145	729	620	620
query18	2494	474	351	351
query19	211	192	148	148
query20	122	110	108	108
query21	228	138	118	118
query22	13634	13590	13459	13459
query23	17334	16430	16211	16211
query23_1	16325	16331	16295	16295
query24	7537	1789	1312	1312
query24_1	1332	1309	1316	1309
query25	586	477	425	425
query26	1317	326	173	173
query27	2683	601	327	327
query28	4425	2059	2031	2031
query29	1096	620	502	502
query30	308	236	202	202
query31	1133	1074	968	968
query32	131	65	61	61
query33	546	325	267	267
query34	1213	1173	655	655
query35	761	771	681	681
query36	1399	1427	1234	1234
query37	149	103	88	88
query38	3202	3127	3046	3046
query39	932	919	901	901
query39_1	880	890	889	889
query40	229	125	101	101
query41	65	62	61	61
query42	94	92	97	92
query43	325	321	276	276
query44	
query45	199	185	178	178
query46	1105	1266	747	747
query47	2416	2375	2241	2241
query48	417	405	306	306
query49	630	467	347	347
query50	1002	355	257	257
query51	4345	4334	4258	4258
query52	89	98	77	77
query53	251	275	192	192
query54	295	231	210	210
query55	79	76	72	72
query56	232	244	208	208
query57	1431	1406	1331	1331
query58	244	206	216	206
query59	1537	1667	1430	1430
query60	292	250	245	245
query61	162	156	160	156
query62	711	655	565	565
query63	232	189	181	181
query64	2589	878	643	643
query65	
query66	1826	470	345	345
query67	29733	29669	29464	29464
query68	
query69	414	296	258	258
query70	957	987	954	954
query71	313	223	214	214
query72	3062	2699	2611	2611
query73	810	764	428	428
query74	5142	4962	4774	4774
query75	2680	2610	2236	2236
query76	2366	1152	747	747
query77	353	385	293	293
query78	12404	12531	11831	11831
query79	1419	1003	776	776
query80	712	477	400	400
query81	474	284	253	253
query82	959	158	123	123
query83	351	281	252	252
query84	263	150	117	117
query85	933	555	447	447
query86	411	326	271	271
query87	3401	3326	3148	3148
query88	3671	2789	2796	2789
query89	432	379	328	328
query90	1805	176	180	176
query91	177	168	138	138
query92	69	60	59	59
query93	1452	1382	891	891
query94	614	359	315	315
query95	704	368	435	368
query96	1087	801	335	335
query97	2724	2733	2582	2582
query98	213	210	203	203
query99	1171	1179	1061	1061
Total cold run time: 252313 ms
Total hot run time: 169484 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 15.00% (6/40) 🎉
Increment coverage report
Complete coverage report

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants