Skip to content

Commit

Permalink
fix: targets gc
Browse files Browse the repository at this point in the history
  • Loading branch information
RayHuangCN committed Jun 17, 2022
1 parent 2660eb4 commit b7451df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM ubuntu:latest
RUN apt update && apt install -y curl
COPY kvass /kvass
ENTRYPOINT ["/kvass"]
3 changes: 1 addition & 2 deletions pkg/coordinator/rebalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ func (c *Coordinator) gcTargets(changeAbleShards []*shardInfo, active map[uint64
// is in_transfer state and had been scraped by other shard
if (tar.TargetState == target.StateInTransfer && st.TargetState == target.StateNormal) ||
// is in normal state and had been scraped by other shard with lower head series
(tar.TargetState == target.StateNormal &&
st.TargetState == target.StateNormal &&
(tar.TargetState == st.TargetState &&
other.runtime.HeadSeries < s.runtime.HeadSeries) {
delete(s.scraping, h)
break
Expand Down

0 comments on commit b7451df

Please sign in to comment.