执行时真实时钟与持久授权回读(撤销/过期即停并保留预备份)、写集合写前落盘、 租约与 attempt 身份、恢复队列与原发送身份分离、成功收尾必须释放维护后再登记终态。
This commit is contained in:
@@ -33,6 +33,7 @@ func libraryFence(jobIDExpr string, epochParam, ownerParam int) string {
|
||||
WHERE j.id = %s
|
||||
AND j.attempt_epoch = $%d
|
||||
AND j.lease_owner = $%d
|
||||
AND j.lease_until > clock_timestamp()
|
||||
AND (
|
||||
j.operation_id = ''
|
||||
OR EXISTS (
|
||||
@@ -41,6 +42,7 @@ func libraryFence(jobIDExpr string, epochParam, ownerParam int) string {
|
||||
AND a.epoch = j.attempt_epoch
|
||||
AND a.owner = j.lease_owner
|
||||
AND a.state IN ('claimed','running')
|
||||
AND a.lease_until > clock_timestamp()
|
||||
)
|
||||
)
|
||||
)`, jobIDExpr, epochParam, ownerParam)
|
||||
|
||||
Reference in New Issue
Block a user