ECS: ECSSync migration error: MySQLSyntaxErrorException: Onbekende kolom 'source_md5' in 'veldenlijst'
Summary: De ECSSync-migratie wordt onmiddellijk voltooid zonder dat een van de Centera-clips daadwerkelijk wordt gemigreerd.
Symptoms
De ECSSync-migratie wordt onmiddellijk voltooid zonder dat een van de Centera-clips daadwerkelijk hoeft te worden gemigreerd.
In /var/log/ecssync/ecs-sync.log file the next error appears:
2020-05-04 03:08:38 WARN [sync-pool-1-t-15] SyncTask: O--! object DNVBT3VHL1NE1e2NMV9CJDMQV5FG41BCFNF5EM0AC0A4KU05821DC failed
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Onbekende kolom 'source_md5' in 'veldenlijst'
bij sun.reflect.GeneratedConstructorAccessor29.newInstance(Unknown Source)
bij sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
... <uitgang afgekapt> ..
Cause
Hieronder volgt een voorbeeld van de tabel die volgens de laatste procedure is gemaakt en die deze kolom niet bevat:
MariaDB [ecs_sync]> beschrijven <table_name>;
+-------------------+---------------+------+-----+---------+-------+
| Gebied | Soort | Nul | Sleutel | Standaard | Extra |
+-------------------+---------------+------+-----+---------+-------+
| source_id | varchar(54) | NEE | PRI | NULL | |
| target_id | Varchar(54) | JA | | NULL | |
| is_directory | Internationaal(11) | NEE | | NULL | |
| Grootte | Bigint(20) | JA | | NULL | |
| mtime | Datum/tijd | JA | | NULL | |
| Toestand | Varchar(32) | NEE | MUL | NULL | |
| transfer_start | Datum/tijd | JA | | NULL | |
| transfer_complete | Datum/tijd | JA | | NULL | |
| verify_start | Datum/tijd | JA | | NULL | |
| verify_complete | Datum/tijd | JA | | NULL | |
| retry_count | Internationaal(11) | JA | | NULL | |
| error_message | Varchar(2048) | JA | | NULL | |
| is_source_deleted | Internationaal(11) | JA | | NULL | |
+-------------------+---------------+------+-----+---------+-------+
13 rijen in set (0.00 sec)
ECSSync versie 3.2.9 heeft een kolom toegevoegd aan de databasetabel om de MD5-checksum van de bron bij te houden (dit wordt vermeld in de releaseopmerkingen).
Resolution
mysql Shell:
alter table <table_name> add column source_md5 VARCHAR(32);
De tabel moet er met de extra kolom uitzien als het volgende voorbeeld:
MariaDB [ecs_sync]> beschrijven <table_name>;
+-------------------+---------------+------+-----+---------+-------+
| Gebied | Soort | Nul | Sleutel | Standaard | Extra |
+-------------------+---------------+------+-----+---------+-------+
| source_id | varchar(54) | NEE | PRI | NULL | |
| target_id | Varchar(54) | JA | | NULL | |
| is_directory | Internationaal(11) | NEE | | NULL | |
| Grootte | Bigint(20) | JA | | NULL | |
| mtime | Datum/tijd | JA | | NULL | |
| Toestand | Varchar(32) | NEE | MUL | NULL | |
| transfer_start | Datum/tijd | JA | | NULL | |
| transfer_complete | Datum/tijd | JA | | NULL | |
| verify_start | Datum/tijd | JA | | NULL | |
| verify_complete | Datum/tijd | JA | | NULL | |
| retry_count | Internationaal(11) | JA | | NULL | |
| error_message | Varchar(2048) | JA | | NULL | |
| is_source_deleted | Internationaal(11) | JA | | NULL | |
| source_md5 | Varchar(32) | JA | | NULL | |
+-------------------+---------------+------+-----+---------+-------+
14 rijen in set (0.00 sec)
MariaDB [ecs_sync]>
(waarbij <table_name> de naam is van uw bestaande tabel).