OSS tries to duplicate hdb_event_log_cleanups on startup
See original GitHub issueVersion 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?
- Metadata change occurs.
- Changed metadata is applied to OSS v2.16.0.
- OSS v2.16.0 container is manually restarted.
- restart loop begins, each time throwing duplicate hdb_event_log_cleanups error.
Screenshots or Screencast
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:
- Created 9 months ago
- Comments:5 (4 by maintainers)
@adas98012 Could you please try and repro this?
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.