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 learner's wal is not empty in rare cases #4292

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

critical27
Copy link
Contributor

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Description:

See the comments in code, below is an example, previously if the part start as learner, all id is 0. But after 20220530-2344, things go wrong.

image

How do you solve it?

Clean wal is start as learner

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • N/A

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

ex. Fixed the bug .....

@codecov-commenter
Copy link

Codecov Report

Merging #4292 (ae0adf8) into master (fba3b18) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4292      +/-   ##
==========================================
+ Coverage   84.92%   84.94%   +0.01%     
==========================================
  Files        1328     1328              
  Lines      131930   131934       +4     
==========================================
+ Hits       112045   112072      +27     
+ Misses      19885    19862      -23     
Impacted Files Coverage Δ
src/kvstore/raftex/RaftPart.cpp 70.14% <100.00%> (-1.83%) ⬇️
src/meta/processors/parts/GetSpaceProcessor.cpp 61.29% <0.00%> (-19.36%) ⬇️
src/common/thread/GenericWorker.h 80.76% <0.00%> (-3.85%) ⬇️
src/storage/mutate/AddEdgesProcessor.cpp 75.39% <0.00%> (-3.83%) ⬇️
src/codec/RowReaderWrapper.cpp 77.55% <0.00%> (-2.66%) ⬇️
src/common/base/Status.h 90.56% <0.00%> (-1.89%) ⬇️
src/storage/mutate/AddVerticesProcessor.cpp 86.32% <0.00%> (-1.71%) ⬇️
src/kvstore/Part.cpp 53.82% <0.00%> (-1.64%) ⬇️
src/common/meta/ServerBasedSchemaManager.cpp 84.37% <0.00%> (-1.05%) ⬇️
... and 27 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 fba3b18...ae0adf8. Read the comment docs.

liwenhui-soul
liwenhui-soul previously approved these changes May 31, 2022
@Sophie-Xie Sophie-Xie added this to the v3.2.0 milestone May 31, 2022
@critical27
Copy link
Contributor Author

Don't merge now

@Shinji-IkariG Shinji-IkariG merged commit 1ee34dd into vesoft-inc:master Jun 1, 2022
@critical27 critical27 deleted the learner branch June 6, 2022 03:07
@Sophie-Xie Sophie-Xie added the affects/v3.1 PR/issue: this bug affects v3.1.x version. label Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/v3.1 PR/issue: this bug affects v3.1.x version. ready for review ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants