Skip to content
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

[YSQL] Move the clearing of reserved_oids_map_ into PgClientServiceImpl #19916

Closed
1 task done
d-uspenskiy opened this issue Nov 9, 2023 · 0 comments
Closed
1 task done
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage

Comments

@d-uspenskiy
Copy link
Contributor

d-uspenskiy commented Nov 9, 2023

Jira Link: DB-8859

Description

The reserved_oids_map_ is the unordered_map field of the PgClientServiceImpl. And PgClientServiceImpl has a functionality to clear this map from items related to removed DBs. Such clearing is performed periodically, but it is scheduled by the TabletServer class and not the PgClientServiceImpl. As a result only instance of PgClientServiceImpl on t-server will perform clearing and instance on a master will not.

Issue Type

kind/enhancement

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@d-uspenskiy d-uspenskiy added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Nov 9, 2023
@d-uspenskiy d-uspenskiy self-assigned this Nov 9, 2023
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue labels Nov 9, 2023
d-uspenskiy added a commit that referenced this issue Nov 11, 2023
…erviceImpl

Summary:
The `reserved_oids_map_` is the `unordered_map` field of the `PgClientServiceImpl`. And `PgClientServiceImpl` has a functionality to clear this map from items related to removed DBs. Such clearing is performed periodically, but it is scheduled by the `TabletServer` class and not the `PgClientServiceImpl` itself. As a result only instance of `PgClientServiceImpl` on `t-server` will perform clearing and instance on a `master` will not.

Solution is to move scheduling of periodical clearing of the `reserved_oids_map_` from the `TabletServer` class into the `PgClientServiceImpl` class.

**Note:** Prior to this change SQL query was used to fetch the list of alive DBs. This diff substitute this SQL with the call of the `YBClient::ListNamespaces` method
Jira: DB-8859

Test Plan: Jenkins

Reviewers: myang

Reviewed By: myang

Subscribers: hsunder, yql, ybase, bogdan

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D30026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants