flowable / flowable/flowable-engine

Add Random Wait Backoff for Acquire Async Jobs, Acquire Timer Jobs and Reset Expired Jobs

Aperta
#1,967 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
9.5k
Fork
2.9k
Merge medio
7h 8m
PR unite (30g)
2

Descrizione

**Is your feature request related to a problem? Please describe.**
We have flowable deployed in a clustered environment using SQL Server with Snapshot Isolation turned on. When there are multiple nodes trying to get async jobs, timer jobs or reset expired jobs at the same time we get a SQLServerException (Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.ACT_RU_JOB' directly or indirectly in database 'casetivity' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement.) which would be fine, except they all have the same retry time so they end up having these collisions over and over and only sometimes break out of it. We are working around this now by extending these runnable jobs and adding a random wait if any exception is thrown during them.

**Describe the solution you'd like**
Adding a random wait when any exception happens in one of the above jobs.

**Describe alternatives you've considered**
We considered adding different job retry times to each node in the cluster but we are in a dockerized AWS container and passing these different values in an environment variable was a little more difficult than adding the random wait, but we could do this.

**Additional context**
Maybe only an issue with SQL Server, but it would seem to at least be an issue in theory with other DBs.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia individuando i runnable per async job, timer job e reset dei job scaduti, insieme ai relativi percorsi di eccezione o retry. Verifica come vengono gestiti i conflitti di snapshot-isolation di SQL Server in cluster, quindi definisci e verifica il completamento come attese casuali che impediscano retry sincronizzati ripetuti per questi job.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend, databases, distributed-systems
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.