citusdata / citusdata/citus

Set operations might skip the earlier tenant accesses on citus_stat_tenants

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

Description

```SQL

SELECT citus_stat_tenants_reset();

(SELECT * FROM simple_test WHERE a = 1 ) UNION (SELECT * FROM simple_test WHERE a = 2) UNION (SELECT * FROM simple_test WHERE a = 3);

select nodeid,colocation_id,tenant_attribute,query_count_in_this_period from citus_stat_tenants;
nodeid | colocation_id | tenant_attribute | query_count_in_this_period
--------+---------------+------------------+----------------------------
2 | 1 | 2 | 1
2 | 1 | 3 | 1
(2 rows)

```

I think we should either have all or none. In general, we seem to have `none` when more than 1 shard involved, which makes sense

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.