question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OSS tries to duplicate hdb_event_log_cleanups on startup

See original GitHub issue

Version Information

Server Version: v2.16.0

Environment

OSS

What is the current behavior?

They are running Cloud Enterprise in parallel with OSS v2.16.0 Both instances (Cloud E & OSS) work using the same metadata file after manually applying. Error occurs when OSS version restarts it then goes into a restart loop with the error that hdb_catalog.hdb_event_log_cleanups table already exists and is trying to be creating again on startup.

What is the expected behavior?

Both instances (Cloud E & OSS) should be able to run using the same metadata file and the local OSS version should be able to restart without error.

How to reproduce the issue?

  1. Metadata change occurs.
  2. Changed metadata is applied to OSS v2.16.0.
  3. OSS v2.16.0 container is manually restarted.
  4. restart loop begins, each time throwing duplicate hdb_event_log_cleanups error.

Screenshots or Screencast

OSS_metadata_tables

Please provide any traces or logs that could help here.

{"detail":{"info":{"code":"unexpected","error":"database query error","internal":{"arguments":[],"error":{"description":null,"exec_status":"FatalError","hint":null,"message":"relation \"hdb_event_log_cleanups\" already exists","status_code":"42P07"},"prepared":false,"statement":"CREATE TABLE hdb_catalog.hdb_event_log_cleanups\n(\n id TEXT DEFAULT hdb_catalog.gen_hasura_uuid() PRIMARY KEY,\n trigger_name TEXT NOT NULL,\n scheduled_at TIMESTAMP NOT NULL,\n deleted_event_logs INTEGER,\n deleted_event_invocation_logs INTEGER,\n status TEXT NOT NULL,\n CHECK (status IN ('scheduled', 'paused', 'completed', 'dead')),\n\n UNIQUE (trigger_name, scheduled_at)\n);\n\nALTER TABLE hdb_catalog.event_invocation_logs\nADD COLUMN trigger_name TEXT;\n\nALTER TABLE hdb_catalog.event_invocation_logs\nDROP CONSTRAINT IF EXISTS event_invocation_logs_event_id_fkey;\n"},"path":"$"},"kind":"catalog_migrate"},"level":"error","timestamp":"2022-12-08T15:14:15.572+0000","type":"startup"}

Any possible solutions/workarounds you’re aware of?

Currently the workaround is to only use Cloud directly, or to not restart the OSS version. This isn’t feasible for production use.

Keywords

hdb_catalog hdb_event_log_cleanups hdb_catalog.hdb_event_log_cleanups restart

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dsandipcommented, Dec 20, 2022

@adas98012 Could you please try and repro this?

0reactions
adas98012commented, Dec 21, 2022

I updated the metadata json file (removed the backend_configs) and then imported it into the OSS project. I don’t see the event trigger (created in the Cloud Standard project) in there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found