Skip to content

branch-4.2: [feature](plugin) Add information_schema.plugins for kernel plugin metadata - #68176

Merged
yiguolei merged 2 commits into
apache:branch-4.2from
CalvinKirs:backport-65644-branch-4.2
Sep 20, 2026
Merged

yiguolei merged 2 commits into
apache:branch-4.2from
CalvinKirs:backport-65644-branch-4.2

Conversation

@CalvinKirs

Copy link
Copy Markdown
Member

apupier and others added 2 commits September 18, 2026 14:09
macos-13 is no more available

https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/

it is causing a lot of PR jobs to wait in queue for a long time when
there is a PR on 4.2 branch

it has been already upgraded on main branch

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->

Signed-off-by: Aurélien Pupier <[email protected]>
…tadata (apache#65644)

Issue apache#65479

Kernel plugin families (filesystem, connector, authentication, lineage)
currently have no unified, queryable inventory: to know which plugins
are loaded on an FE, one has to read logs. This PR adds a unified
`information_schema.plugins` system table listing all successfully
loaded kernel plugins of the currently connected FE.

Columns: `PLUGIN_NAME`, `PLUGIN_TYPE`, `PLUGIN_VERSION`, `SOURCE`,
`DESCRIPTION`.

Design points:
- `(plugin_type, plugin_name)` is the primary key, enforced at load
time: the first registration wins and is never silently overridden, so a
directory jar can never displace a built-in plugin.
- `name()` / `description()` are snapshotted once at load time; querying
the table never executes plugin code. A broken self-report fails the
load.
- Plugin names are validated at load (trimmed, non-blank, <=64 chars,
`[A-Za-z0-9._-]`); an invalid name fails the load for external plugins.
- `PLUGIN_VERSION` comes from the jar MANIFEST `Implementation-Version`
(NULL when unavailable), never from plugin interface methods.
- Only successfully loaded plugins appear; load failures go to logs. No
status/fail_reason columns.
- Querying requires global ADMIN privilege; non-admin users see no rows.
- View semantics are per-FE: the BE scanner RPCs the currently connected
FE (same pattern as `catalog_meta_cache_statistics`), so per-FE jar
deployment can be audited connection by connection.

Implementation:
- `fe-extension-spi`: add `default String description()` to
`PluginFactory` (empty by default, zero migration cost).
- `fe-extension-loader`: new process-wide `PluginRegistry` (load-time
snapshots only) and `PluginNames` validation;
`DirectoryPluginRuntimeManager` snapshots name/description and reads
`Implementation-Version` from the jar containing the factory class.
- The four family managers register BUILTIN/EXTERNAL rows; filesystem
and connector managers now also reject external providers whose name
conflicts with an already-registered one.
- FE: `SchemaTable` definition + `MetadataGenerator` data source; thrift
`TSchemaTableName.PLUGINS`. Reuses the existing MySQL-compat
`TSchemaTableType.SCH_PLUGINS`.
- BE: new `schema_plugins_scanner` wired into `schema_scanner`.

Example:

```
mysql> SELECT * FROM information_schema.plugins;
+-------------+----------------+----------------+---------+---------------------------+
| PLUGIN_NAME | PLUGIN_TYPE    | PLUGIN_VERSION | SOURCE  | DESCRIPTION               |
+-------------+----------------+----------------+---------+---------------------------+
| hdfs        | FILESYSTEM     | NULL           | BUILTIN |                           |
| jdbc        | CONNECTOR      | NULL           | BUILTIN |                           |
| oidc        | AUTHENTICATION | 4.0.0          | EXTERNAL| OIDC authentication       |
+-------------+----------------+----------------+---------+---------------------------+
```

Add `information_schema.plugins` system table listing loaded kernel
plugins (filesystem/connector/authentication/lineage) of the currently
connected FE; requires ADMIN privilege.

- Test
- [x] Unit test: `PluginRegistryTest`,
`DirectoryPluginRuntimeManagerMetadataTest`
- [x] Regression test:
`regression-test/suites/query_p0/schema_table/test_plugins_schema.groovy`

- Behavior changed:
    - [x] Yes, new `information_schema.plugins` table (additive only).

- Does this need documentation?
- [x] Yes, `information_schema.plugins` should be documented as a new
system table.

(cherry picked from commit 0c35a6e)
@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

@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?

SQL_BLOCK_RULE_STATUS = 12,
AUTHENTICATION_INTEGRATIONS = 13,
ROLE_MAPPINGS = 14,
EXTENSIONS = 18,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note on the thrift enum values: EXTENSIONS = 18 and SCH_EXTENSIONS = 73 intentionally match master instead of taking the next free number on branch-4.2. TSchemaTableName is sent from BE to FE, so using 15 here would collide with master's TABLE_STREAMS = 15 during a rolling upgrade. Gaps in a thrift enum are fine.

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 34.15% (14/41) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 67.37% (64/95) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.36% (31436/42277)
Line Coverage 58.63% (350494/597806)
Region Coverage 55.41% (292803/528457)
Branch Coverage 56.20% (131994/234851)

@yiguolei
yiguolei merged commit 1acff6a into apache:branch-4.2 Sep 20, 2026
27 of 31 checks passed
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.

4 participants