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

Always trying to create md_ets_metadata table even if it exists. #774

Open
tzzed opened this issue Sep 12, 2024 · 1 comment
Open

Always trying to create md_ets_metadata table even if it exists. #774

tzzed opened this issue Sep 12, 2024 · 1 comment
Assignees

Comments

@tzzed
Copy link

tzzed commented Sep 12, 2024

Describe the bug
I always get log of create table md_ets_metadata. Is due to a bad config ?

To Reproduce
Steps to reproduce the behavior:
LOG: statement: create table if not exists md_ets_metadata (table_name text primary key, entity_attrs jsonb)

Expected behavior
Should be log only once

Environment (please complete the following information):

  • OS: Linux
  • Version lastest

Additional context
I use quantumleap with timescaleDB

@c0c0n3
Copy link
Member

c0c0n3 commented Sep 19, 2024

hi @tzzed :-)

Thanks for reporting this.

I always get log of create table md_ets_metadata. Is due to a bad config ?

No it's just one (of the many) QuantumLeap warts :-) Because QL creates tables dynamically, it can't know beforehand if the metadata table is already there, so it tries creating it everytime. If the table exists, the DB will do nothing because of the if not exists clause.

Should be log only once

Easier said than done. There's no transactions, no ACID semantics. So how would you handle concurrency? E.g. think of ten QuantumLeap processes executing that statement at about the same time...

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