citusdata / citusdata/citus

`citus_worker_stat_activity` does not show queries executed via local execution

Open
#5,282 0 comments 0 reactions 0 assignees View on GitHub
mx
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

Although this is sort of expected, let's keep track of it. `citus_worker_stat_activity` is used to show the queries that are executed on the shards on MX.

For example, if you do a multi-shard update `UPDATE test SET x = 100` on the workers, you'd see something like:
```SQL
select query from citus_worker_stat_activity;
-[ RECORD 1 ]-------------------------------------
query | UPDATE public.test_102036 test SET x = 100
-[ RECORD 2 ]-------------------------------------
query | UPDATE public.test_102033 test SET x = 100
-[ RECORD 3 ]-------------------------------------
query | COMMIT PREPARED 'citus_7_37254_3133_6'
-[ RECORD 4 ]-------------------------------------
query | UPDATE public.test_102039 test SET x = 100
-[ RECORD 5 ]-------------------------------------
query | UPDATE public.test_102037 test SET x = 100
-[ RECORD 6 ]-------------------------------------
query | UPDATE public.test_102038 test SET x = 100
-[ RECORD 7 ]-------------------------------------
query | UPDATE public.test_102034 test SET x = 100
```

However, the locally executed commands will not show up in the `citus_worker_stat_activity` as we currently do this per query session base, and local execution is done on the same session where the actual distributed query is running.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.