Spring Batch ORA-08177: can't serialize access for this transaction when running single job, SERIALIZED isolation level

前端 未结 9 514
后悔当初
后悔当初 2020-12-01 07:58

I am getting this exception with SERIALIZED isolation level on JobRepository in Spring Batch:

org.springframework.dao.CannotSerializeTransactionException: Pr         


        
9条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-01 08:33

    From official doc - 4.3.1

    The default isolation level for that method is SERIALIZABLE, which is quite aggressive: READ_COMMITTED would work just as well; READ_UNCOMMITTED would be fine if two processes are not likely to collide in this way. However, since a call to the create* method is quite short, it is unlikely that the SERIALIZED will cause problems, as long as the database platform supports it.

提交回复
热议问题