pg-sharding / pg-sharding/spqr

`SHOW task_group` displays `RUNNING` status after coordinator crash

Open
#1,982 2 comments 0 reactions 1 assignee Claimed by @EinKrebs View on GitHub
Dominant language
Go
Stars
1.5k
Forks
98
Avg merge
18h 52m
Merged PRs (30d)
93

Description

**Problem**: after executing the `STOP TASK_GROUP ` command, the `SHOW task_group` command continues to display the status as `RUNNING` for that task group, instead of showing it as stopped.

**Why**: the `STOP TASK GROUP` command only sets a stop flag in memory (`StopMoveTaskGroup[id] = true` in [qdb/memqdb.go:1228](https://github.com/pg-sharding/spqr/blob/master/qdb/memqdb.go#L1228)), but does not update the status in `TaskGroupIDToStatus`.

The status is read from `TaskGroupIDToStatus` when executing `SHOW task_group` (see [pkg/engine/virtual_relation.go:575-591](https://github.com/pg-sharding/spqr/blob/master/pkg/engine/virtual_relation.go#L575-L591)), so it remains `RUNNING` until the process actually processes the stop flag.

**What to do**: The `STOP TASK_GROUP` command should update the task group status to `STOPPED` (or similar) in `TaskGroupIDToStatus` so that `SHOW TASK_GROUP` displays the correct status of the stopped task group.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.