-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c2c: introduce SHOW TENANT
to surface information about a tenant record
#91261
Labels
A-disaster-recovery
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-disaster-recovery
Comments
adityamaru
added
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
A-disaster-recovery
labels
Nov 4, 2022
cc @cockroachdb/disaster-recovery |
lidorcarmel
added a commit
to lidorcarmel/cockroach
that referenced
this issue
Nov 17, 2022
This change adds: `SHOW TENANT <name>` To show the id, name and status of the tenant. The status can be ACTIVE/ADD/DROP. The next step is to extend this to show replication status (more details in cockroachdb#91261). For example: ``` root@localhost:26257/defaultdb> show tenant my_tenant; id | name | status -----+-----------+--------- 6 | my_tenant | ACTIVE (1 row) Time: 2ms total (execution 2ms / network 0ms) root@localhost:26257/defaultdb> show tenant not_my_tenant; ERROR: tenant "not_my_tenant" does not exist SQLSTATE: 42704 ``` Informs: cockroachdb#91261 Release note: None Epic CRDB-18749
lidorcarmel
added a commit
to lidorcarmel/cockroach
that referenced
this issue
Nov 17, 2022
This change adds: `SHOW TENANT <name>` To show the id, name and status of the tenant. The status can be ACTIVE/ADD/DROP. The next step is to extend this to show replication status (more details in cockroachdb#91261). For example: ``` root@localhost:26257/defaultdb> show tenant my_tenant; id | name | status -----+-----------+--------- 6 | my_tenant | ACTIVE (1 row) Time: 2ms total (execution 2ms / network 0ms) root@localhost:26257/defaultdb> show tenant not_my_tenant; ERROR: tenant "not_my_tenant" does not exist SQLSTATE: 42704 ``` Informs: cockroachdb#91261 Release note: None Epic CRDB-18749
craig bot
pushed a commit
that referenced
this issue
Nov 18, 2022
91939: sql: introduce SHOW TENANT <name> r=lidorcarmel a=lidorcarmel This change adds: `SHOW TENANT <name>` To show the id, name and status of the tenant. The status can be ACTIVE/ADD/DROP. The next step is to extend this to show replication status (more details in #91261). For example: ``` root@localhost:26257/defaultdb> show tenant my_tenant; id | name | status -----+-----------+--------- 6 | my_tenant | ACTIVE (1 row) Time: 2ms total (execution 2ms / network 0ms) root@localhost:26257/defaultdb> show tenant not_my_tenant; ERROR: tenant "not_my_tenant" does not exist SQLSTATE: 42704 ``` Informs: #91261 Release note: None Epic CRDB-18749 Co-authored-by: Lidor Carmel <[email protected]>
lidorcarmel
added a commit
to lidorcarmel/cockroach
that referenced
this issue
Nov 29, 2022
Extending SHOW TENANT to also allow showing replication status which contains info such as the protected timestamp on the destination cluster and the source cluster name. Informs: cockroachdb#91261 Epic: CRDB-18749 Release note: None
lidorcarmel
added a commit
to lidorcarmel/cockroach
that referenced
this issue
Dec 2, 2022
Extending SHOW TENANT to also allow showing replication status which contains info such as the protected timestamp on the destination cluster and the source cluster name. Informs: cockroachdb#91261 Epic: CRDB-18749 Release note: None
Noting some more things we want in
|
lidorcarmel
added a commit
to lidorcarmel/cockroach
that referenced
this issue
Dec 6, 2022
Extending SHOW TENANT to also allow showing replication status which contains info such as the protected timestamp on the destination cluster and the source cluster name. Command output right after the destination cluster is created: ``` [email protected]:26257/defaultdb> show tenant dest5 with replication status; id | name | status | source_tenant_name | source_cluster_uri | replication_job_id | replicated_time | retained_time -----+-------+--------+--------------------+--------------------+--------------------+-----------------+---------------- 7 | dest5 | ADD | NULL | NULL | 819890711267737601 | NULL | NULL (1 row) ``` A bit later we have most stats: ``` [email protected]:26257/defaultdb> show tenant dest5 with replication status; id | name | status | source_tenant_name | source_cluster_uri | replication_job_id | replicated_time | retained_time -----+-------+--------+--------------------+-------------------------------------------------------+--------------------+-----------------+----------------------------- 7 | dest5 | ADD | src | postgresql://[email protected]:26257/defaultdb?ssl...crt | 819890711267737601 | NULL | 2022-12-05 23:00:04.516331 (1 row) ``` And a moment later the replication time is populated. Informs: cockroachdb#91261 Epic: CRDB-18749 Release note: None
lidorcarmel
added a commit
to lidorcarmel/cockroach
that referenced
this issue
Dec 6, 2022
Extending SHOW TENANT to also allow showing replication status which contains info such as the protected timestamp on the destination cluster and the source cluster name. Command output right after the destination cluster is created: ``` [email protected]:26257/defaultdb> show tenant dest5 with replication status; id | name | status | source_tenant_name | source_cluster_uri | replication_job_id | replicated_time | retained_time -----+-------+--------+--------------------+--------------------+--------------------+-----------------+---------------- 7 | dest5 | ADD | NULL | NULL | 819890711267737601 | NULL | NULL (1 row) ``` A bit later we have most stats (manually adjusting the source_cluster_uri): ``` [email protected]:26257/defaultdb> show tenant dest5 with replication status; id | name | status | source_tenant_name | source_cluster_uri | replication_job_id | replicated_time | retained_time -----+-------+--------+--------------------+-------------------------------------------------------+--------------------+-----------------+----------------------------- 7 | dest5 | ADD | src | postgresql://[email protected]:26257/defaultdb?ssl...crt | 819890711267737601 | NULL | 2022-12-05 23:00:04.516331 (1 row) ``` And a moment later the replication time is populated. Informs: cockroachdb#91261 Epic: CRDB-18749 Release note: None
lidorcarmel
added a commit
to lidorcarmel/cockroach
that referenced
this issue
Dec 7, 2022
Extending SHOW TENANT to also allow showing replication status which contains info such as the protected timestamp on the destination cluster and the source cluster name. Command output right after the destination cluster is created: ``` [email protected]:26257/defaultdb> show tenant dest5 with replication status; id | name | status | source_tenant_name | source_cluster_uri | replication_job_id | replicated_time | retained_time -----+-------+--------+--------------------+--------------------+--------------------+-----------------+---------------- 7 | dest5 | ADD | NULL | NULL | 819890711267737601 | NULL | NULL (1 row) ``` A bit later we have most stats (manually adjusting the source_cluster_uri): ``` [email protected]:26257/defaultdb> show tenant dest5 with replication status; id | name | status | source_tenant_name | source_cluster_uri | replication_job_id | replicated_time | retained_time -----+-------+--------+--------------------+-------------------------------------------------------+--------------------+-----------------+----------------------------- 7 | dest5 | ADD | src | postgresql://[email protected]:26257/defaultdb?ssl...crt | 819890711267737601 | NULL | 2022-12-05 23:00:04.516331 (1 row) ``` And a moment later the replication time is populated. Informs: cockroachdb#91261 Epic: CRDB-18749 Release note: None
lidorcarmel
added a commit
to lidorcarmel/cockroach
that referenced
this issue
Dec 8, 2022
Extending SHOW TENANT to also allow showing replication status which contains info such as the protected timestamp on the destination cluster and the source cluster name. Command output right after the destination cluster is created: ``` [email protected]:26257/defaultdb> show tenant dest5 with replication status; id | name | status | source_tenant_name | source_cluster_uri | replication_job_id | replicated_time | retained_time -----+-------+--------+--------------------+--------------------+--------------------+-----------------+---------------- 7 | dest5 | ADD | NULL | NULL | 819890711267737601 | NULL | NULL (1 row) ``` A bit later we have most stats (manually adjusting the source_cluster_uri): ``` [email protected]:26257/defaultdb> show tenant dest5 with replication status; id | name | status | source_tenant_name | source_cluster_uri | replication_job_id | replicated_time | retained_time -----+-------+--------+--------------------+-------------------------------------------------------+--------------------+-----------------+----------------------------- 7 | dest5 | ADD | src | postgresql://[email protected]:26257/defaultdb?ssl...crt | 819890711267737601 | NULL | 2022-12-05 23:00:04.516331 (1 row) ``` And a moment later the replication time is populated. Informs: cockroachdb#91261 Epic: CRDB-18749 Release note: None
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-disaster-recovery
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-disaster-recovery
SHOW TENANT <name>
to begin with, surface a single column indicating the state of the tenant i.e. active, offline, replicating etc.SHOW TENANT <name> WITH REPLICATION STATUS
- if the tenant is being streamed into, then we surface more information pertaining to the stream such as:Total replicated bytes(we decided to have the replicated bytes as a metric, at least for now)Jira issue: CRDB-21177
Epic CRDB-18749
The text was updated successfully, but these errors were encountered: