7hong opened a new issue, #3365:
URL: https://github.com/apache/amoro/issues/3365

   ### What happened?
   
   In the `commit` method, if the snapshot is commit successfully, but an 
exception occurs in the database and the status update of OptimizingProcess 
fails, commit will be executed again during the next schedule. Since 
`hasCommitted` is already true, the code for database update cannot be called 
(the database has been restored at this time Normal), this table will always be 
in the `committing` state.
   
   
https://github.com/apache/amoro/blob/6ef1be7ebee65fcef6f9ca5db9984b248b0768be/amoro-ams/src/main/java/org/apache/amoro/server/optimizing/OptimizingQueue.java#L555-L588
   
   ### Affects Versions
   
   0.7.1
   
   ### What table formats are you seeing the problem on?
   
   Iceberg
   
   ### What engines are you seeing the problem on?
   
   AMS
   
   ### How to reproduce
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   2024-12-13 16:07:19,925 ERROR [async-optimizing-commit-executor-0] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) Commit optimizing 
failed
   org.apache.amoro.server.exception.PersistenceException: 
org.apache.ibatis.exceptions.PersistenceException:
   ### Error updating database.  Cause: java.sql.SQLException: Cannot get a 
connection, pool error Timeout waiting for idle object, 
borrowMaxWaitDuration=PT2S
   ### The error may exist in 
org/apache/amoro/server/persistence/mapper/OptimizingMapper.java (best guess)
   ### The error may involve 
org.apache.amoro.server.persistence.mapper.OptimizingMapper.updateOptimizingProcess
   ### The error occurred while executing an update
   ### Cause: java.sql.SQLException: Cannot get a connection, pool error 
Timeout waiting for idle object, borrowMaxWaitDuration=PT2S
   ......
   ......
   2024-12-13 16:08:19,926 WARN [async-optimizing-commit-executor-2] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:09:19,926 WARN [async-optimizing-commit-executor-9] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:10:19,927 WARN [async-optimizing-commit-executor-9] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:11:19,927 WARN [async-optimizing-commit-executor-1] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:12:19,927 WARN [async-optimizing-commit-executor-7] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:13:19,928 WARN [async-optimizing-commit-executor-1] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:14:19,930 WARN [async-optimizing-commit-executor-9] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:15:19,930 WARN [async-optimizing-commit-executor-5] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:16:19,931 WARN [async-optimizing-commit-executor-2] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:17:19,935 WARN [async-optimizing-commit-executor-3] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:18:19,935 WARN [async-optimizing-commit-executor-6] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:19:19,935 WARN [async-optimizing-commit-executor-2] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:20:19,935 WARN [async-optimizing-commit-executor-8] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:21:19,936 WARN [async-optimizing-commit-executor-4] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:22:19,936 WARN [async-optimizing-commit-executor-7] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:23:19,936 WARN [async-optimizing-commit-executor-2] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:24:19,936 WARN [async-optimizing-commit-executor-9] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   2024-12-13 16:25:19,937 WARN [async-optimizing-commit-executor-1] 
[OptimizingQueue] [] - 
lichen.billing_fact.dwm_i5_eco_sn_user_bw(tableId=120055) has already 
committed, give up
   
   ....
   ```
   
   
   ### Anything else
   
   This has happened before. The status lasted for several hours. Restarting 
the service solved the problem.
   
   
![image](https://github.com/user-attachments/assets/16078dae-b1bd-4e2d-85bb-6da08a3249ff)
   
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's Code of Conduct


-- 
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]

Reply via email to