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: don't allow create table which failed when open #743

Merged
merged 3 commits into from
Mar 17, 2023

Conversation

jiacai2050
Copy link
Contributor

Which issue does this PR close?

Closes #

Rationale for this change

Followup PR of #722

When table open failed when recovery, we should prevent user from creating table with same name, otherwise schema maybe wong, and seq will be reset to 0.

What changes are included in this PR?

  • Add open failed table in Space, and check it when create new table.

Are there any user-facing changes?

No

How does this change test

CI, but I don't test this corner case since I don't know how to mock recovery failure of one table.

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2023

Codecov Report

Merging #743 (5ce156a) into main (56bb7b0) will increase coverage by 0.02%.
The diff coverage is 64.82%.

❗ Current head 5ce156a differs from pull request most recent head 191f7c2. Consider uploading reports for the commit 191f7c2 to get more accurate results

@@            Coverage Diff             @@
##             main     #743      +/-   ##
==========================================
+ Coverage   68.43%   68.45%   +0.02%     
==========================================
  Files         294      292       -2     
  Lines       45712    45355     -357     
==========================================
- Hits        31284    31050     -234     
+ Misses      14428    14305     -123     
Impacted Files Coverage Δ
analytic_engine/src/instance/engine.rs 64.03% <ø> (ø)
server/src/http.rs 0.00% <0.00%> (ø)
server/src/server.rs 0.00% <0.00%> (ø)
sql/src/frontend.rs 0.00% <0.00%> (ø)
sql/src/influxql/mod.rs 100.00% <ø> (+100.00%) ⬆️
sql/src/influxql/planner.rs 0.00% <0.00%> (ø)
sql/src/planner.rs 91.96% <0.00%> (-0.06%) ⬇️
sql/src/tests.rs 88.00% <ø> (-5.81%) ⬇️
analytic_engine/src/instance/create.rs 92.55% <33.33%> (-4.04%) ⬇️
analytic_engine/src/table/data.rs 91.54% <50.00%> (+0.10%) ⬆️
... and 3 more

... and 4 files with indirect coverage changes

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

analytic_engine/src/instance/engine.rs Outdated Show resolved Hide resolved
analytic_engine/src/instance/open.rs Outdated Show resolved Hide resolved
analytic_engine/src/instance/open.rs Outdated Show resolved Hide resolved
jiacai2050 and others added 2 commits March 16, 2023 16:52
Co-authored-by: chunshao.rcs <worcsrcsgg@163.com>
Copy link
Contributor

@chunshao90 chunshao90 left a comment

Choose a reason for hiding this comment

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

LGTM

@chunshao90 chunshao90 added this pull request to the merge queue Mar 17, 2023
Merged via the queue into apache:main with commit d71e875 Mar 17, 2023
@jiacai2050 jiacai2050 deleted the feat-open-failed-table branch March 17, 2023 08:17
chunshao90 added a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* feat: don't allow create table which failed when open

* Update analytic_engine/src/instance/engine.rs

Co-authored-by: chunshao.rcs <worcsrcsgg@163.com>

* fix CR

---------

Co-authored-by: chunshao.rcs <worcsrcsgg@163.com>
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