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

Always set rebuildIndexGuard to finish(succeed or failed) #4633

Merged
merged 1 commit into from
Sep 9, 2022
Merged

Always set rebuildIndexGuard to finish(succeed or failed) #4633

merged 1 commit into from
Sep 9, 2022

Conversation

SuperYoko
Copy link
Contributor

@SuperYoko SuperYoko commented Sep 9, 2022

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

rebuild tag index job always failed after stop a running job #1263

Description:

This hit a status check

if (std::get<0>(it->first) == space_ && it->second != IndexState::FINISHED) { ... }

While failed job keep its state IndexState::BUILDING and never changed before restarting in function RebuildIndexTask::invoke, so that no other rebuild task could pass this check.

How do you solve it?

Current always set it to FINISHED when this function end its lifetime.

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:

Fix a bug that rebuild index will always failed after a failed job unless restart.

@SuperYoko SuperYoko marked this pull request as ready for review September 9, 2022 04:40
@liwenhui-soul liwenhui-soul added the ready-for-testing PR: ready for the CI test label Sep 9, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #4633 (2a51ed5) into master (3157fad) will decrease coverage by 0.01%.
The diff coverage is 82.45%.

@@            Coverage Diff             @@
##           master    #4633      +/-   ##
==========================================
- Coverage   84.72%   84.71%   -0.02%     
==========================================
  Files        1357     1358       +1     
  Lines      135323   135655     +332     
==========================================
+ Hits       114652   114918     +266     
- Misses      20671    20737      +66     
Impacted Files Coverage Δ
src/common/datatypes/Geography.h 50.94% <ø> (ø)
src/common/expression/LabelAttributeExpression.h 77.41% <0.00%> (ø)
src/common/function/FunctionManager.cpp 79.04% <0.00%> (-0.15%) ⬇️
src/graph/planner/plan/PlanNodeVisitor.h 100.00% <ø> (ø)
src/graph/planner/plan/Query.h 96.41% <ø> (+0.53%) ⬆️
src/graph/visitor/PropertyTrackerVisitor.h 100.00% <ø> (ø)
src/graph/visitor/PrunePropertiesVisitor.h 50.00% <ø> (ø)
src/kvstore/raftex/RaftPart.h 93.10% <ø> (ø)
src/kvstore/raftex/RaftPart.cpp 69.90% <16.66%> (-1.82%) ⬇️
src/daemons/MetaDaemon.cpp 67.18% <50.00%> (ø)
... and 71 more

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

@critical27 critical27 merged commit a7a0185 into vesoft-inc:master Sep 9, 2022
@critical27
Copy link
Contributor

Good job~

@SuperYoko SuperYoko deleted the fix_rebuild_index_block branch September 28, 2022 02:43
@jinyingsunny
Copy link

3.3-ent-rc and 3.3-rc
checked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants