You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug](High) table_streams still shows dropped base table name after base table is dropped #65389
After a stream is created on a base table, dropping the base table does not make information_schema.table_streams report the base table as unavailable.
The regression case expects the stream to remain listed while the base table columns are reported as N/A. However, BASE_TABLE_NAME still returns the dropped table name.
Actual assertion:
expected: <N/A> but was: <base_drop>
What You Expected?
After dropping the base table, information_schema.table_streams should reflect that the stream's base table is unavailable, for example:
Breakwater-GitHub-Analysis-Slot: slot_954e705100d6
This content is generated by AI for reference only.
Initial assessment: this looks like a real FE metadata bug in the table-stream information schema path, not a BE schema-scanner issue.
Evidence from the current reachable upstream code path:
The BE SchemaTableStreamsScanner only requests TABLE_STREAMS rows from FE and copies the returned TRow values into the result block. It does not decide the base-table fields.
FE builds these rows in TableStreamManager.fillTableStreamValuesMetadataResult(). That method emits N/A for BASE_TABLE_NAME, BASE_TABLE_DB, BASE_TABLE_CTL, and BASE_TABLE_TYPE only when stream.getBaseTableNullable() returns null; otherwise it emits the cached base table qualifiers.
BaseTableStream keeps a volatile cached baseTable reference created with the stream. getBaseTableNullable() only resolves through StreamTableInfo when that cache is already null.
The base-table drop path unregisters and recycles the dropped table, and Database.unregisterTable() marks the dropped table object as dropped. However, dropping the base table does not clear the stream's cached baseTable reference and does not remove the stream from TableStreamManager; removeTableStream() is only called when the dropped object itself is a stream.
So after DROP TABLE base_drop FORCE, the stream can still hold a non-null Java reference to the old dropped table object. information_schema.table_streams then sees a non-null base table and prints base_drop, which matches the reported assertion failure. The existing code already has a dropped-table check in the partition-offset cleanup path, but the table_streams metadata row builder does not apply an equivalent unavailable-table check.
Recommended next step:
Fix the FE metadata/lifecycle handling so a dropped or no-longer-resolvable base table is treated as unavailable for stream metadata. The most local fix is around TableStreamManager.fillTableStreamValuesMetadataResult() / BaseTableStream.getBaseTableNullable(): do not use cached qualifiers when the cached table is dropped, and return N/A for the base-table columns. A broader lifecycle fix could also mark the dependent stream stale and clear/invalidate the cached base-table reference when the base table is dropped.
Please make the intended stale semantics explicit in the fix: if a dropped base table means the stream is stale, IS_STALE and STALE_REASON should be updated consistently, not only the displayed BASE_TABLE_* columns.
Add a regression case for the live-runtime path: create base table, create stream, drop base table with FORCE, then query information_schema.table_streams before any FE restart and assert the base-table fields and stale fields. This case is important because the failure is caused by an in-memory cached reference.
Missing information that would help confirm the exact expected behavior:
The full information_schema.table_streams row from the failing run, especially BASE_TABLE_CTL, BASE_TABLE_TYPE, IS_STALE, and STALE_REASON.
FE logs around CREATE STREAM, DROP TABLE base_drop FORCE, and the following information_schema.table_streams query.
Whether the expected behavior is only display-level N/A, or whether the stream should also become stale/disabled after its base table is dropped.
The exact public commit/branch if d4a077caf8a is not reachable from the public upstream remote; I inspected the same table-stream metadata path on current reachable upstream/master.
changed the title [-][Bug] table_streams still shows dropped base table name after base table is dropped[/-][+][Bug](High) table_streams still shows dropped base table name after base table is dropped[/+]on Jul 16, 2026
Activity
zclllyybb commentedon Jul 8, 2026
Breakwater-GitHub-Analysis-Slot: slot_954e705100d6
This content is generated by AI for reference only.
Initial assessment: this looks like a real FE metadata bug in the table-stream information schema path, not a BE schema-scanner issue.
Evidence from the current reachable upstream code path:
SchemaTableStreamsScanneronly requestsTABLE_STREAMSrows from FE and copies the returnedTRowvalues into the result block. It does not decide the base-table fields.TableStreamManager.fillTableStreamValuesMetadataResult(). That method emitsN/AforBASE_TABLE_NAME,BASE_TABLE_DB,BASE_TABLE_CTL, andBASE_TABLE_TYPEonly whenstream.getBaseTableNullable()returnsnull; otherwise it emits the cached base table qualifiers.BaseTableStreamkeeps a volatile cachedbaseTablereference created with the stream.getBaseTableNullable()only resolves throughStreamTableInfowhen that cache is alreadynull.Database.unregisterTable()marks the dropped table object as dropped. However, dropping the base table does not clear the stream's cachedbaseTablereference and does not remove the stream fromTableStreamManager;removeTableStream()is only called when the dropped object itself is a stream.So after
DROP TABLE base_drop FORCE, the stream can still hold a non-null Java reference to the old dropped table object.information_schema.table_streamsthen sees a non-null base table and printsbase_drop, which matches the reported assertion failure. The existing code already has a dropped-table check in the partition-offset cleanup path, but thetable_streamsmetadata row builder does not apply an equivalent unavailable-table check.Recommended next step:
TableStreamManager.fillTableStreamValuesMetadataResult()/BaseTableStream.getBaseTableNullable(): do not use cached qualifiers when the cached table is dropped, and returnN/Afor the base-table columns. A broader lifecycle fix could also mark the dependent stream stale and clear/invalidate the cached base-table reference when the base table is dropped.IS_STALEandSTALE_REASONshould be updated consistently, not only the displayedBASE_TABLE_*columns.FORCE, then queryinformation_schema.table_streamsbefore any FE restart and assert the base-table fields and stale fields. This case is important because the failure is caused by an in-memory cached reference.Missing information that would help confirm the exact expected behavior:
information_schema.table_streamsrow from the failing run, especiallyBASE_TABLE_CTL,BASE_TABLE_TYPE,IS_STALE, andSTALE_REASON.CREATE STREAM,DROP TABLE base_drop FORCE, and the followinginformation_schema.table_streamsquery.N/A, or whether the stream should also become stale/disabled after its base table is dropped.d4a077caf8ais not reachable from the public upstream remote; I inspected the same table-stream metadata path on current reachable upstream/master.[-][Bug] table_streams still shows dropped base table name after base table is dropped[/-][+][Bug](High) table_streams still shows dropped base table name after base table is dropped[/+]TsukiokaKogane commentedon Sep 9, 2026
fixed in #67173