Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
2.6.2
-
None
Description
Issue discovered alongside with another bugs which leads upgrade to fail in the middle with partially applying changes to DB. It leads to exception in code:
private void renameServiceDeletedColumn() throws AmbariException, SQLException { if (dbAccessor.tableHasColumn(CLUSTER_CONFIG_TABLE, SERVICE_DELETED_COLUMN)) { dbAccessor.renameColumn(CLUSTER_CONFIG_TABLE, SERVICE_DELETED_COLUMN, new DBAccessor.DBColumnInfo(UNMAPPED_COLUMN, Short.class, null, 0, false)); } }
Exception: ERROR: column "unmapped" of relation "clusterconfig" already exists (err.png)
Table generated DDL from current state:
-- auto-generated definition CREATE TABLE clusterconfig ( config_id INT8(19) NOT NULL CONSTRAINT pk_clusterconfig PRIMARY KEY, version_tag VARCHAR(255) NOT NULL, version INT8(19) NOT NULL, type_name VARCHAR(255) NOT NULL, cluster_id INT8(19) NOT NULL CONSTRAINT fk_clusterconfig_cluster_id REFERENCES clusters, stack_id INT8(19) NOT NULL CONSTRAINT fk_clusterconfig_stack_id REFERENCES stack, config_data TEXT(max) NOT NULL, config_attributes TEXT(max), create_timestamp INT8(19) NOT NULL, unmapped INT2(5) DEFAULT 0 NOT NULL, selected INT2(5) DEFAULT 0 NOT NULL, selected_timestamp INT8(19) DEFAULT 0 NOT NULL, service_deleted INT2(5) DEFAULT 0 NOT NULL ); CREATE UNIQUE INDEX uq_config_type_tag ON clusterconfig (cluster_id, type_name, version_tag); CREATE UNIQUE INDEX uq_config_type_version ON clusterconfig (cluster_id, type_name, version);
Attachments
Attachments
Issue Links
- links to