temporalio / temporalio/temporal
Matching Service Task Queue Metadata Management
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.2k
- Forks
- 1.9k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 228
Description
Is your feature request related to a problem? Please describe.
Currently, partitioned matching task queue may encounter issue if the following scenario happens:
- t = 0: task added to task queue
queuewith partition 42 - t = 1: no poller appears, task is persisted to DB
- t = 2: matching host with task queue
queuewith partition 42 shutdown
according to the current arch, each task queue manager (within matching service) is responsible for loading tasks from DB and push the task to a common rally point if task queue is partitioned, so poller, can poll existing tasks, without starvation.
the above arch has a flaw, i.e. if the task queue (with partition) is not directly polled, and task queue manager not initialized, then the poller may take a long time picking up some tasks (if num of worker << number of partition & randomization)
Describe the solution you'd like
- common metadata manager / service / component which will notify all matching service to initialize corresponding task queue manager
- round robin polling
Describe alternatives you've considered
N/A
Additional context
Possibly related issue: #459
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.