flowable / flowable/flowable-engine

AsyncExecutor `TimerJobAcquisition` does not support tenant

Aperta
#3,429 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

**Describe the bug**
```ini
flowable.async-executor-activate=true
flowable.process.async.executor.async-job-acquisition-enabled=true
flowable.process.async.executor.timer-job-acquisition-enabled=true
```

```java
@Bean
configuration.setAsyncExecutorTenantId(TENANT_ID);
```

The below methods do not use the property `TENANT_ID`. So jobs from all tenants are selected.

[MybatisJobDataManager.findJobsToExecute](https://github.com/flowable/flowable-engine/blob/flowable-release-6.6.0/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/persistence/entity/data/impl/MybatisJobDataManager.java#L62) has no [WHERE TENANT_ID = ?](https://github.com/flowable/flowable-engine/blob/flowable-release-6.6.0/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/mapping/entity/Job.xml#L51)

[MybatisTimerJobDataManager.findJobsToExecute](https://github.com/flowable/flowable-engine/blob/flowable-release-6.6.0/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/persistence/entity/data/impl/MybatisTimerJobDataManager.java#L105) has no [WHERE TENANT_ID = ?](https://github.com/flowable/flowable-engine/blob/flowable-release-6.6.0/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/mapping/entity/TimerJob.xml#L148)

**Expected behavior**
I want 2 tenants in the same database. And 2 apps with self properties to acquire its own jobs.

**Additional context**
ver 6.6.0

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia con MybatisJobDataManager.findJobsToExecute e MybatisTimerJobDataManager.findJobsToExecute, quindi esamina i mapping Job.xml e TimerJob.xml referenziati. Traccia come configuration.setAsyncExecutorTenantId fornisce TENANT_ID. Il lavoro è completato quando ogni executor acquisisce solo i job del tenant configurato quando più tenant condividono un database.

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

Valutazione

Stack tecnologico
java
Ambito
backend, databases
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.