ArafatKhan2198 commented on PR #8070:
URL: https://github.com/apache/ozone/pull/8070#issuecomment-2731992444

   Hey @devmadhuu !
   
   I tested your changes and attempted to simulate the insertion of a duplicate 
record in the unhealthy_containers table.
   
   After reviewing the output logs, I confirmed that the error message was 
correctly printed.
   
   Most importantly, the container health task was not aborted, confirming that 
the patch works as expected.
   
   `
   Error while inserting unhealthy container record: UnhealthyContainers (1, 
UNDER_REPLICATED, 1742282240441, 3, 2, 1, null)
   `
   
   Full log message :- 
   ```
   2025-03-18 12:47:20 2025-03-18 07:17:20,508 
[Recon-EventQueue-DeadNodeForReconDeadNodeHandler] ERROR 
persistence.ContainerHealthSchemaManager: Error while inserting unhealthy 
container record: UnhealthyContainers (1, UNDER_REPLICATED, 1742282240441, 3, 
2, 1, null)
   2025-03-18 12:47:20 org.jooq.exception.DataAccessException: SQL [insert into 
"UNHEALTHY_CONTAINERS" ("container_id", "container_state", "in_state_since", 
"expected_replica_count", "actual_replica_count", "replica_delta", "reason") 
values (cast(? as bigint), cast(? as varchar(32672)), cast(? as bigint), cast(? 
as int), cast(? as int), cast(? as int), cast(? as varchar(32672)))]; The 
statement was aborted because it would have caused a duplicate key value in a 
unique or primary key constraint or unique index identified by 
'pk_container_id' defined on 'UNHEALTHY_CONTAINERS'.
   2025-03-18 12:47:20     at org.jooq_3.11.9.DERBY.debug(Unknown Source)
   2025-03-18 12:47:20     at org.jooq.impl.Tools.translate(Tools.java:2429)
   2025-03-18 12:47:20     at 
org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:832)
   2025-03-18 12:47:20     at 
org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:364)
   2025-03-18 12:47:20     at 
org.jooq.impl.TableRecordImpl.storeInsert0(TableRecordImpl.java:202)
   2025-03-18 12:47:20     at 
org.jooq.impl.TableRecordImpl$1.operate(TableRecordImpl.java:173)
   2025-03-18 12:47:20     at 
org.jooq.impl.RecordDelegate.operate(RecordDelegate.java:125)
   2025-03-18 12:47:20     at 
org.jooq.impl.TableRecordImpl.storeInsert(TableRecordImpl.java:169)
   2025-03-18 12:47:20     at 
org.jooq.impl.TableRecordImpl.insert(TableRecordImpl.java:157)
   2025-03-18 12:47:20     at 
org.jooq.impl.TableRecordImpl.insert(TableRecordImpl.java:152)
   2025-03-18 12:47:20     at org.jooq.impl.DAOImpl.insert(DAOImpl.java:175)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to