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

feat: map shard id to region id in manifest #645

Merged

Conversation

Rachelint
Copy link
Contributor

Which issue does this PR close?

Closes #

Rationale for this change

Before, manifest is only stored in wal storage, so region id can olny be mapped to table id(otherwise, manifest of specific table will lose after being moved to new shard).

But now, if can mao shard id to region id again because we store the manifest snapshot in oss. We can force it to do snapshot before closing to solve the problem above.

What changes are included in this PR?

See title.

Are there any user-facing changes?

None.

How does this change test

Test by ut.

@Rachelint Rachelint force-pushed the map-shard-id-to-region-id-in-manifest branch from 44e31f2 to c9b582d Compare February 14, 2023 08:39
analytic_engine/src/manifest/details.rs Show resolved Hide resolved
analytic_engine/src/manifest/details.rs Outdated Show resolved Hide resolved
analytic_engine/src/manifest/details.rs Outdated Show resolved Hide resolved
analytic_engine/src/manifest/mod.rs Show resolved Hide resolved
@Rachelint Rachelint force-pushed the map-shard-id-to-region-id-in-manifest branch from c9b582d to 5847258 Compare February 14, 2023 12:35
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter
Copy link

Codecov Report

Merging #645 (99b55f0) into main (d906f9f) will increase coverage by 0.40%.
The diff coverage is 48.29%.

❗ Current head 99b55f0 differs from pull request most recent head 5847258. Consider uploading reports for the commit 5847258 to get more accurate results

@@            Coverage Diff             @@
##             main     #645      +/-   ##
==========================================
+ Coverage   66.44%   66.84%   +0.40%     
==========================================
  Files         283      283              
  Lines       44286    44006     -280     
==========================================
- Hits        29424    29415       -9     
+ Misses      14862    14591     -271     
Impacted Files Coverage Δ
analytic_engine/src/instance/close.rs 0.00% <0.00%> (ø)
analytic_engine/src/instance/engine.rs 64.03% <0.00%> (ø)
analytic_engine/src/manifest/mod.rs 0.00% <0.00%> (ø)
analytic_engine/src/sst/meta_data/mod.rs 24.19% <ø> (ø)
analytic_engine/src/sst/parquet/encoding.rs 95.42% <ø> (ø)
common_types/src/datum.rs 50.69% <ø> (ø)
common_types/src/projected_schema.rs 69.54% <0.00%> (-0.81%) ⬇️
common_util/src/config.rs 87.05% <0.00%> (ø)
server/src/grpc/mod.rs 0.00% <ø> (ø)
server/src/grpc/remote_engine_service/error.rs 0.00% <ø> (ø)
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Rachelint Rachelint added this pull request to the merge queue Feb 14, 2023
Merged via the queue into apache:main with commit 9e7733b Feb 14, 2023
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* expose do_snapshot method in manifest.

* Force to do snapshot of manifest when closing table.

* map shard id to region id in manifest.

* address CR.
@Rachelint Rachelint deleted the map-shard-id-to-region-id-in-manifest branch May 27, 2023 12:20
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.

3 participants