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

Table creation / deletion oddities when writing from Telegraf | Requires Investigation #25695

Open
peterbarnett03 opened this issue Dec 20, 2024 · 1 comment

Comments

@peterbarnett03
Copy link
Contributor

An odd scenario where deleting a DB seems to work, but then when recreating it, tag issues are created. This is primarily seen on Telegraf writing on 1.33, and doesn't appear when writing line protocol from the CLI (on macOS). So needs investigation in several areas.

Steps to reproduce:

  1. Create DB cpu
  2. Run SHOW DATABASES (influxQL) > The cpu DB has been created
  3. Delete DB cpu
  4. Run SHOW DATABASES > The cpu DB has been deleted
  5. Start Telegraf in v2 mode, attempt to write to cpu DB > Say's it's writing, but doesn't, and doesn't create DB or table
  6. Start Telegraf in v1 mode, attempt to write to cpu DB > Fails on write, error says we're trying to add a tag that doesn't exist | Telegraf in v2 continues to say it's writing, but doesn't
  7. Run SHOW DATABASES > The cpu DB has returned, with no data tables, but contains system tables

Expected behaviour:
When Telegraf says it's writing, it should create a new DB, a new table, write the data, and have no tag issues, since it's a fresh new database and table.

Actual behaviour:
InfluxDB is saying that there is an attempt to write a new tag, as if there is an old table it's trying to write to and can't, and therefore it doesn't write to a new table at all (but it does create the DB).

Seems like the system:

  1. Gets a write request
  2. Creates the new DB
  3. Checks if there's a table
  4. Discovers a table, can't write a tag to it
  5. Complains

It should never discover a table. Perhaps due to soft delete?

Environment info:

System: Linux ARM
Storage: Memory
Telegraf: v1.33

Logs:
error_message: "Detected a new tag 'label' in write. The tag set is immutable on first write to the table."

@pauldix
Copy link
Member

pauldix commented Dec 20, 2024

I think Telegraf is excess noise here. We should be able to reproduce using just curl against the v1 or v2 write APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants