Archive Manager Duplicate partition name
search cancel

Archive Manager Duplicate partition name

book

Article ID: 188729

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

Error found in ARCHMGR.OUT file:

ene 28 00:00:32 ERROR TRACE at ModelArchDBImp.cc(4970): doSqlQuery/mysql_query: Failure executing query:
ALTER TABLE event DROP PARTITION EVENT_13_12_2019 - Error in list of partitions to DROP
mar 03 00:00:07 ERROR TRACE at ModelArchDBImp.cc(4970): doSqlQuery/mysql_query: Failure executing query:
ALTER TABLE event DROP PARTITION EVENT_17_1_2020 - Error in list of partitions to DROP
abr 04 00:00:11 ERROR TRACE at ModelArchDBImp.cc(4970): doSqlQuery/mysql_query: Failure executing query:
ALTER TABLE event ADD PARTITION (PARTITION EVENT_4_4_2020 VALUES LESS THAN (1586059200)) - Duplicate partition name EVENT_4_4_2020
abr 04 00:00:11 ERROR TRACE at ModelArchDBImp.cc(4970): doSqlQuery/mysql_query: Failure executing query:
INSERT INTO partitionlog(table_name, partition_name, values_less_than, creation_time, destroy_time) VALUES('event','EVENT_4_4_2020','1586059200',1585969211,NULL) - Duplicate entry 'EVENT_4_4_2020' for key 'partition_name'
abr 04 23:00:19 ERROR TRACE at ModelArchDBImp.cc(4970): doSqlQuery/mysql_query: Failure executing query:
ALTER TABLE event ADD PARTITION (PARTITION EVENT_4_4_2020 VALUES LESS THAN (1586059200)) - Duplicate partition name EVENT_4_4_2020
abr 04 23:00:19 ERROR TRACE at ModelArchDBImp.cc(4970): doSqlQuery/mysql_query: Failure executing query:
INSERT INTO partitionlog(table_name, partition_name, values_less_than, creation_time, destroy_time) VALUES('event','EVENT_4_4_2020','1586059200',1586055619,NULL) - Duplicate entry 'EVENT_4_4_2020' for key 'partition_name'

Environment

Release : All Support Spectrum Versions

Component : SPCAEM - Spectrum Alarm & Event Management

Resolution

Those two tables (EVENT_13_12_2019 and EVENT_17_1_2020) were already dropped based on the following MySQL query and also in the list of files under $SPECROOT/mysql/data/ddmdb/ directory.
Also the EVENT_4_4_2020 table were successfully created and it is in the $SPECROOT/mysql/data/ddmdb/ directory.


mysql> select partition_id, partition_name,FROM_UNIXTIME(values_less_than),FROM_UNIXTIME(creation_time),FROM_UNIXTIME(destroy_time) from partitionlog;
+--------------+------------------+---------------------------------+------------------------------+-----------------------------+
| partition_id | partition_name   | FROM_UNIXTIME(values_less_than) | FROM_UNIXTIME(creation_time) | FROM_UNIXTIME(destroy_time) |
+--------------+------------------+---------------------------------+------------------------------+-----------------------------+
|          356 | EVENT_13_12_2019 | 2019-12-14 00:00:00             | 2019-12-12 00:00:01          | 2020-01-28 00:00:32         |
|          391 | EVENT_17_1_2020  | 2020-01-18 00:00:00             | 2020-01-16 00:00:53          | 2020-03-03 00:00:07         |
|          469 | EVENT_4_4_2020   | 2020-04-04 23:00:00             | 2020-04-03 00:00:54          | NULL                        |


DIR *.* > ddmdb.txt file:
-a---          4/4/2020  11:00 PM  117440512 event#p#event_4_4_2020.ibd 

Restarted the Archive Manager

Additional Information

If the partition_name exists in the partitionlog in mysql without a null value and the event file exists in the $SPECROOT/mysql/data/ddmdb then you can safely ignore the "Duplicate Partition Name xxxxx for key 'partition name'.