taosdata / taosdata/TDengine

删除超级表,未删除子表,再次创建超级表,插入数据能成功,但是分表用的tag为NULL

Open
#35,182 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
25.1k
Forks
5k
Avg merge
4d 59m
Merged PRs (30d)
7

Description

Bug Description
删除超级表,未删除子表,再次创建超级表,插入数据能成功,可在超级表查询到数据,但是分表用的tag为NULL,对应的子表数据为空。对应的流计算失败,提示很困惑。

To Reproduce
Steps to reproduce the behavior:

  1. 创建一个超级表, t_tick
  2. 插入数据 insert into t_tick_aapl using(t_tick) tags('aapl') values(...)
  3. 删除t_tick
  4. 再次创建t_tick
  5. 插入数据 insert into t_tick_aapl using(t_tick) tags('aapl') values(...)
  6. 此时查询t_tick,获得symbo为null

Expected Behavior
应该拒绝,如果无法重建超级表与子表的关系

Screenshots
没准备

Environment (please complete the following information):

  • OS: ubuntu 24.4
  • 8c 16g 500g
  • TDengine Version 3.4.1

Additional Context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the lifecycle in the issue on TDengine 3.4.1: create t_tick, insert through t_tick_aapl, drop and recreate t_tick, then insert and query it. Trace the supertable/child-table relationship and tag handling; done when the invalid recreation is rejected instead of accepting rows with a NULL tag, with a less confusing stream error.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.