Co-authored-by: Emre Dincturk <emre.dincturk@smilecdr.com>
This commit is contained in:
parent
ed616f7a6d
commit
8d39e3466c
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
type: fix
|
||||||
|
issue: 5230
|
||||||
|
title: "batch2 jobs on MS SQL Server were failing to transition to FAILED state after max retrials
|
||||||
|
for the job are exhausted. This is now fixed."
|
||||||
|
|
|
@ -300,7 +300,7 @@ public class JpaJobPersistenceImpl implements IJobPersistence {
|
||||||
Validate.isTrue(changeCount > 0, "changed chunk matching %s", chunkId);
|
Validate.isTrue(changeCount > 0, "changed chunk matching %s", chunkId);
|
||||||
|
|
||||||
Query query = myEntityManager.createQuery("update Batch2WorkChunkEntity " + "set myStatus = :failed "
|
Query query = myEntityManager.createQuery("update Batch2WorkChunkEntity " + "set myStatus = :failed "
|
||||||
+ ",myErrorMessage = CONCAT('Too many errors: ', myErrorCount, '. Last error msg was ', myErrorMessage) "
|
+ ",myErrorMessage = CONCAT('Too many errors: ', CAST(myErrorCount as string), '. Last error msg was ', myErrorMessage) "
|
||||||
+ "where myId = :chunkId and myErrorCount > :maxCount");
|
+ "where myId = :chunkId and myErrorCount > :maxCount");
|
||||||
query.setParameter("chunkId", chunkId);
|
query.setParameter("chunkId", chunkId);
|
||||||
query.setParameter("failed", WorkChunkStatusEnum.FAILED);
|
query.setParameter("failed", WorkChunkStatusEnum.FAILED);
|
||||||
|
|
Loading…
Reference in New Issue