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

fix crash when drop space #3185

Merged
merged 1 commit into from
Oct 22, 2021
Merged

fix crash when drop space #3185

merged 1 commit into from
Oct 22, 2021

Conversation

critical27
Copy link
Contributor

Reproduce procedure:

  1. use the latest configuration file
  2. clean all data (maybe not necessary)
  3. start up the cluster, create a space
  4. wait until all leader elected in show hosts
  5. stop and reboot the cluster
  6. drop the space, storage will crash later

@critical27 critical27 added ready-for-testing PR: ready for the CI test cherry-pick-v2.6 PR: need cherry-pick to this version labels Oct 22, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #3185 (9592e1f) into master (50b1760) will increase coverage by 0.04%.
The diff coverage is 86.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3185      +/-   ##
==========================================
+ Coverage   85.17%   85.22%   +0.04%     
==========================================
  Files        1294     1295       +1     
  Lines      118261   118264       +3     
==========================================
+ Hits       100733   100793      +60     
+ Misses      17528    17471      -57     
Impacted Files Coverage Δ
src/common/time/ScopedTimer.h 100.00% <ø> (ø)
src/common/time/test/ScopedTimerTest.cpp 100.00% <ø> (ø)
src/common/utils/IndexKeyUtils.h 90.25% <ø> (+0.56%) ⬆️
src/graph/executor/Executor.cpp 84.02% <ø> (ø)
src/graph/executor/Executor.h 100.00% <ø> (ø)
src/graph/executor/admin/CharsetExecutor.cpp 100.00% <ø> (ø)
src/graph/executor/admin/ConfigExecutor.cpp 94.54% <ø> (ø)
src/graph/executor/admin/GroupExecutor.cpp 67.90% <ø> (ø)
src/graph/executor/admin/PartExecutor.cpp 96.55% <ø> (ø)
src/graph/executor/admin/ShowHostsExecutor.cpp 93.47% <ø> (ø)
... and 183 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db6da98...9592e1f. Read the comment docs.

@@ -124,8 +124,8 @@ RocksEngine::RocksEngine(GraphSpaceID spaceId,
}
CHECK(status.ok()) << status.ToString();
db_.reset(db);
partsNum_ = allParts().size();
extractorLen_ = sizeof(PartitionID) + vIdLen;
Copy link
Contributor

Choose a reason for hiding this comment

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

why can this modification avoid crash?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

allParts need to be correct, if it is initialized before we set extractorLen_, allParts will be wrong

@yixinglu yixinglu merged commit b8dc6ac into vesoft-inc:master Oct 22, 2021
Sophie-Xie pushed a commit that referenced this pull request Oct 22, 2021
@critical27 critical27 deleted the crash branch October 22, 2021 06:41
critical27 added a commit that referenced this pull request Oct 22, 2021
* fix crash when drop space (#3185)

* fix geography default value check (#3189)

Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com>
Co-authored-by: jie.wang <38901892+jievince@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-v2.6 PR: need cherry-pick to this version ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants