Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated Data in Supertable #29259

Open
sailadv-hsystem opened this issue Dec 21, 2024 · 0 comments
Open

Duplicated Data in Supertable #29259

sailadv-hsystem opened this issue Dec 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sailadv-hsystem
Copy link

Bug Description

In random cases the supertable allow to insert duplicated values with the same TS and TAGS.

Expected Behavior
I would like to not have duplicate value for the same TS and TAGS in the supertable.

Screenshots

Table Description
taos> describe boat;

field type length note
ts TIMESTAMP 8
variable_value_float FLOAT 4
variable_value_string VARCHAR 100
original_ts TIMESTAMP 8
boat_uuid VARCHAR 36 TAG
variable_name VARCHAR 50 TAG
Query OK, 6 row(s) in set (0.001758s)

Query of duplicated data
taos> select ts, count(* ) from hdata.boat where boat_uuid="d17bb161-4732-4115-b2c5-7f0bf07e2034" and variable_name= 'Alert 3' and ts < '2023-12-30' and ts > '2023-09-01' group by ts having count(*) > 1;

ts count(* )
2023-11-20 13:15:50.000000 2
2023-10-23 10:42:35.000000 2
Query OK, 2 row(s) in set (14.703768s)

Detail of duplicated data
taos> select TAGS TBNAME, *, CHAR_LENGTH(variable_name), LENGTH(variable_name), CHAR_LENGTH(boat_uuid), LENGTH(boat_uuid), CHAR_LENGTH(TBNAME), LENGTH(TBNAME) from boat where ts = '2023-11-20 13:15:50.000000' and boat_uuid="d17bb161-4732-4115-b2c5-7f0bf07e2034" and variable_name= 'Alert 3'\G;

*************************** 1.row ***************************

Column Value
tbname boat_d17bb161_4732_4115_b2c5_7f0bf07e2034_b7e677d69d25d8fb5efa73fc944782cf
ts 2023-11-20 13:15:50.000000
variable_value_float 0.0000000
variable_value_string NULL
original_ts 2023-11-20 13:15:50.000000
boat_uuid d17bb161-4732-4115-b2c5-7f0bf07e2034
variable_name Alert 3
char_length(variable_name) 7
length(variable_name) 7
char_length(boat_uuid) 36
length(boat_uuid) 36
char_length(tbname) 74
length(tbname) 74

*************************** 2.row ***************************

Column Value
tbname boat_d17bb161_4732_4115_b2c5_7f0bf07e2034_b7e677d69d25d8fb5efa73fc944782cf
ts 2023-11-20 13:15:50.000000
variable_value_float 0.0000000
variable_value_string NULL
original_ts 2023-11-20 13:15:50.000000
boat_uuid d17bb161-4732-4115-b2c5-7f0bf07e2034
variable_name Bilge Alert Cabin 3
char_length(variable_name) 7
length(variable_name) 7
char_length(boat_uuid) 36
length(boat_uuid) 36
char_length(tbname) 74
length(tbname) 74
Query OK, 2 row(s) in set (0.012173s)

Environment (please complete the following information):

  • OS: 22.04.1-Ubuntu
  • Memory, CPU, current Disk Space: 16GB, 4vCPU, Available 629G of Space (as main node)
  • TDengine Version 3.1.1.0

Additional Context
Originally we had a different version of the database (3.0.0) and we updated TDEngine (with a data re-upload) trying to solve the issue.

@sailadv-hsystem sailadv-hsystem added the bug Something isn't working label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant