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

avoid rebuilding MetadataCache for each placement insertion #7163

Merged

Conversation

zhjwpku
Copy link
Contributor

@zhjwpku zhjwpku commented Aug 30, 2023

for reference table and distributed table without colocation field,
each time we insert a shard placement, it invalidate the metadata cache with the
relation oid, and build it by a following LoadShardPlacement, this was partly
fixed by #6722 for CreateColocatedShards, problem still exists for other cases,
this patch fix them all.

@zhjwpku zhjwpku force-pushed the reduce_metadata_cache_invalidation_count branch from d5c192f to 723292a Compare August 30, 2023 07:22
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #7163 (87c341e) into main (5034f8e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #7163      +/-   ##
==========================================
- Coverage   93.21%   93.21%   -0.01%     
==========================================
  Files         274      274              
  Lines       59229    59233       +4     
==========================================
+ Hits        55209    55212       +3     
- Misses       4020     4021       +1     

for reference table and distributed table without colocation field,
each time we insert a shard placement, it invalidate the metadata
cache with the relation oid, and build it by a following
`LoadShardPlacement`, this was partly fixed by citusdata#6722 for
CreateColocatedShards, problem still exists for other cases, this
patch fix them.

Signed-off-by: Zhao Junwang <zhjwpku@gmail.com>
@marcocitus marcocitus force-pushed the reduce_metadata_cache_invalidation_count branch from 723292a to 87c341e Compare September 1, 2023 11:26
@zhjwpku
Copy link
Contributor Author

zhjwpku commented Sep 3, 2023

The CI failure comes from yum downloading error,

Errors during downloading metadata for repository 'pgdg13':
  - Curl error (28): Timeout was reached for https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-8-x86_64/repodata/66c3376ef940648286ceac068f0f024b2b5768664204cf0d5410982548db9ff9-filelists.xml.gz [Connection timed out after 30000 milliseconds]
  - Curl error (28): Timeout was reached for https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-8-x86_64/repodata/5d3e28eec645e70dd0622b156475aad958dc11b7bbd614d8a74f96878aa2a12d-postgresqldbserver-13.xml.gz [Connection timed out after 30000 milliseconds]
  - Curl error (28): Timeout was reached for https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-8-x86_64/repodata/42871651c55e3cb47b573af067bfed80d6b3cdf8da33a5cb8a9caeffbbfcf016-primary.xml.gz [Connection timed out after 30000 milliseconds]
Error: Failed to download metadata for repo 'pgdg13': Yum repo downloading error: Downloading error(s): repodata/42871651c55e3cb47b573af067bfed80d6b3cdf8da33a5cb8a9caeffbbfcf016-primary.xml.gz - Cannot download, all mirrors were already tried without success; repodata/66c3[37](https://github.com/citusdata/citus/actions/runs/6048859216/job/16415026509?pr=7163#step:9:38)6ef940648286ceac068f0f024b2b5768664204cf0d5410982548db9ff9-filelists.xml.gz - Cannot download, all mirrors were already tried without success; repodata/5d3e28eec645e70dd0622b156475aad958dc11b7bbd614d8a74f96878aa2a12d-postgresqldbserver-13.xml.gz - Cannot download, all mirrors were already tried without success
Error: Process completed with exit code 1.

maybe reschedule the workflow?

@marcocitus marcocitus merged commit 9fd4ef0 into citusdata:main Sep 4, 2023
110 checks passed
@marcocitus
Copy link
Member

Thanks, a very useful improvement and the code flows a bit more nicely.

@zhjwpku zhjwpku deleted the reduce_metadata_cache_invalidation_count branch September 7, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants