conductor-oss / conductor-oss/conductor
Bug: Inconsistency definition of the correlation_id
- Dominant language
- Java
- Stars
- 32.2k
- Forks
- 1k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 37
Description
**Describe the bug**
Inconsistency in the definition of the correlation_id attribute in two tables. Same attribute but different length.
- postgres-persistence/src/main/resources/db/migration_postgres/V8__indexing.sql
> CREATE TABLE workflow_index (
workflow_id VARCHAR(255) NOT NULL,
**correlation_id VARCHAR(128) NULL**,
workflow_type VARCHAR(128) NOT NULL,
start_time TIMESTAMP WITH TIME ZONE NOT NULL,
status VARCHAR(32) NOT NULL,
json_data JSONB NOT NULL,
PRIMARY KEY (workflow_id)
);
- postgres-persistence/src/main/resources/db/migration_postgres/V1__initial_schema.sql
> CREATE TABLE workflow (
id SERIAL,
created_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
modified_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
workflow_id varchar(255) NOT NULL,
**correlation_id varchar(255),**
json_data TEXT NOT NULL,
PRIMARY KEY (id)
);
A clear and concise description of what the bug is.
**Details**
Conductor version: 3.21.12
Persistence implementation: Postgres
Queue implementation: Postgres
Lock: N/A
Workflow definition: N/A
Task definition: N/A
Event handler definition: N/A
**Expected behavior**
Same type of definition
Contributor guide
Research direction
Compare postgres-persistence/src/main/resources/db/migration_postgres/V8__indexing.sql with V1__initial_schema.sql, focusing on the two correlation_id definitions. Review the migration history before deciding how consistency should be represented for existing and new databases. Done means both table definitions use the same correlation_id length, with the relevant PostgreSQL migration behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100