Repository navigation
[lake] Fail fast on duplicate lake format plugins - #4916
Draft
Hachiman566 wants to merge 1 commit into
Draft
Hachiman566 wants to merge 1 commit into
Hachiman566 wants to merge 1 commit into
Conversation
1 of 2 tasks
Contributor
|
@Hachiman566 let me know once ready for review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generative AI disclosure: Yes — OpenAI Codex. Human review is pending.
Purpose
Linked issue: close #4601
When two lake plugins register the same format,
LakeStoragePluginSetUpselects the first match. The result depends on discovery order. This change fails on the second match and reports the requested format and both implementation classes, followingConfigProviders.Brief change log
PluginLakeStorageWrapperfor a single match. Keep the existing exception type and message when no plugin matches.tests-without-lake-spiserver test jar for Paimon and Spark UT. It excludes the test SPI registration that conflicts with the real Paimon plugin and retains all other entries. The default servertests.jarremains available to other tests.Review question: This change also rejects the same implementation discovered through both PluginManager and SPI. It does not deduplicate by class name because separate classloaders may load different versions with the same name. Should this case also count as a conflict? This behavior still needs maintainer confirmation.
Tests
Validated on main
8a92b4fd8with Java 11 and Maven 3.8.6, using-Dskip.iceberg-1.12.LakeEnabledTableCreateITCase#testCreateLakeEnabledTablepassed (1 integration test).SparkLakePaimonCatalogTestpassed all 13 tests, with no failures or aborted suites.PluginLakeStorageWrapper.git diff --checkpassed.Not run: the full repository matrix, full Paimon/Spark suites beyond these targets, or JDK 8/JDK 17 runs, including Iceberg 1.12.
API and Format
No public signatures or stored formats change. Duplicate requested-format registrations now fail instead of silently selecting the first implementation.
Documentation
No new configuration options or setup steps are introduced. No documentation changes are included.