temporalio / temporalio/temporal

Matching Service Task Queue Metadata Management

Open
#881 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

difficulty: medium enhancement performance
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:

  1. t = 0: task added to task queue queue with partition 42
  2. t = 1: no poller appears, task is persisted to DB
  3. t = 2: matching host with task queue queue with 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

  1. common metadata manager / service / component which will notify all matching service to initialize corresponding task queue manager
  2. round robin polling

Describe alternatives you've considered
N/A

Additional context
Possibly related issue: #459

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.