Mar 10, 2023 15:08:08.087 (SRM/NCMConfigHandler335544320/bucketReader) (com.aprisma.spectrum.app.repmgr.dc.event.handler.NCMConfigHandler) - (ERROR) - Error occurred while processing NCM event bucket, Record: com.aprisma.spectrum.app.repmgr.dc.dto.BucketRow@4d810c92
Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [INSERT INTO ncm_config (config_text_id, device_model_key, change_time, trap_from, trap_user, trap_on, lines_changed, rel_lines_changed, violated_policies, compliant_policies, spec_user_name, comm_mode, landscape, last_updated_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)]; Data truncation: Data too long for column 'violated_policies' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'violated_policies' at row 1
Release : 22.2
Need to increase the character limit
The violated policy entry was about 4200 characters long so we updated the table to be 5000 characters:
ALTER TABLE ncm_config MODIFY COLUMN violated_policies varchar(5000);
We also updated the compliant as this will happen eventually:
ALTER TABLE ncm_config MODIFY COLUMN compliant_policies varchar(5000);