Skip to content

Fix SHOW TTL wildcard path scope - #18763

Merged
jt2594838 merged 2 commits into
apache:masterfrom
hongzhi-gao:fix/show-ttl-wildcard-scope
Sep 30, 2026
Merged

jt2594838 merged 2 commits into
apache:masterfrom
hongzhi-gao:fix/show-ttl-wildcard-scope

Conversation

@hongzhi-gao

Copy link
Copy Markdown
Contributor

Description

Content: Fix wildcard TTL queries

Intersect the requested SHOW TTL ON .** path with the authority scope before querying ConfigNode, so unrelated TTL rules are excluded. Queries without a trailing ** retain their existing behavior.


This PR has:

  • been self-reviewed.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes
  • ClusterConfigTaskExecutor
  • IoTDBSeriesPermissionIT

@Caideyipi Caideyipi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Blocking: the new code passes queryScope to intersectWithFullPathPrefixTree as the full-path/prefix-tree argument, but SHOW TTL accepts general prefixPath patterns. A query such as SHOW TTL ON root.*.** is valid, while the helper explicitly requires its second argument to contain only full paths or literal prefix patterns such as root.sg.**.

I reproduced this on this commit with READ_SCHEMA granted only on root.ttl_scope_a.** and TTL rules on root.ttl_scope_a, root.ttl_scope_a.g_0., and root.ttl_scope_b. SHOW TTL ON root.*. returned 0 rows, although it should return the two authorized root.ttl_scope_a rules. root.ttl_*.** has the same unsupported shape.

Please handle wildcards before the trailing ** when intersecting the query and authority scopes, and add regression coverage for these cases.

@hongzhi-gao
hongzhi-gao force-pushed the fix/show-ttl-wildcard-scope branch from cab5b7e to 9395262 Compare September 30, 2026 03:06
@jt2594838
jt2594838 merged commit 5a9c6b9 into apache:master Sep 30, 2026
38 of 39 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.

3 participants