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

Only the YB-Master Leader should refresh the tablespace info in memory #7798

Closed
deeps1991 opened this issue Mar 24, 2021 · 0 comments
Closed
Assignees
Labels
area/docdb YugabyteDB core features
Milestone

Comments

@deeps1991
Copy link
Contributor

Today the Catalog Manager spins up a background task that reads the PG sys catalog tables periodically and builds the table->tablespace and tablespace->replication_info maps in memory.
This information is used during load balancing and to place the replicas of a table when it is created. Thus, only the master leader really needs to run this background task.

@deeps1991 deeps1991 added the area/docdb YugabyteDB core features label Mar 24, 2021
@deeps1991 deeps1991 self-assigned this Mar 24, 2021
deeps1991 added a commit that referenced this issue May 3, 2021
…e info in memory

Summary:
Today the Catalog Manager spins up a background task that reads the PG sys catalog
tables periodically and builds the table->tablespace and tablespace->replication_info
maps in memory. This information is used during load balancing and to place the replicas
of a table when it is created. Thus, only the master leader really needs to run this
background task.

This patch causes the tablespace refresh task to be started up by the
CatalogManagerBackgroundTask that invokes the load balancer. This
guarantees that the background task will run only on the leader.

Additionally the TestTablespaceProperties was timing out on clang_asan,
gcc-release, gcc-debug build types. Fixed the test by increasing
timeouts for some build types. Added logs to the test to facilitate easy
debugging.

Test Plan: ybd --scb --sj --java-test org.yb.pgsql.TestTablespaceProperties

Reviewers: rahuldesirazu

Reviewed By: rahuldesirazu

Subscribers: zyu, kannan, yql

Differential Revision: https://phabricator.dev.yugabyte.com/D11133
@m-iancu m-iancu added this to the 2.7.x milestone May 4, 2021
YintongMa pushed a commit to YintongMa/yugabyte-db that referenced this issue May 26, 2021
…ablespace info in memory

Summary:
Today the Catalog Manager spins up a background task that reads the PG sys catalog
tables periodically and builds the table->tablespace and tablespace->replication_info
maps in memory. This information is used during load balancing and to place the replicas
of a table when it is created. Thus, only the master leader really needs to run this
background task.

This patch causes the tablespace refresh task to be started up by the
CatalogManagerBackgroundTask that invokes the load balancer. This
guarantees that the background task will run only on the leader.

Additionally the TestTablespaceProperties was timing out on clang_asan,
gcc-release, gcc-debug build types. Fixed the test by increasing
timeouts for some build types. Added logs to the test to facilitate easy
debugging.

Test Plan: ybd --scb --sj --java-test org.yb.pgsql.TestTablespaceProperties

Reviewers: rahuldesirazu

Reviewed By: rahuldesirazu

Subscribers: zyu, kannan, yql

Differential Revision: https://phabricator.dev.yugabyte.com/D11133
deeps1991 added a commit that referenced this issue Jun 29, 2021
… the tablespace info in memory

Summary:
Today the Catalog Manager spins up a background task that reads the PG sys catalog
tables periodically and builds the table->tablespace and tablespace->replication_info
maps in memory. This information is used during load balancing and to place the replicas
of a table when it is created. Thus, only the master leader really needs to run this
background task.

This patch causes the tablespace refresh task to be started up by the
CatalogManagerBackgroundTask that invokes the load balancer. This
guarantees that the background task will run only on the leader.

Additionally the TestTablespaceProperties was timing out on clang_asan,
gcc-release, gcc-debug build types. Fixed the test by increasing
timeouts for some build types. Added logs to the test to facilitate easy
debugging.

Test Plan:
ybd --scb --sj --java-test org.yb.pgsql.TestTablespaceProperties
Jenkins: rebase: 2.6

Reviewers: rahuldesirazu

Reviewed By: rahuldesirazu

Subscribers: bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D12096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features
Projects
None yet
Development

No branches or pull requests

2 participants