Skip to content

Commit

Permalink
fix: Watch channel task may stuck forever until qn become offline (mi…
Browse files Browse the repository at this point in the history
…lvus-io#33394)

issue: milvus-io#32901
pr milvus-io#32814 introduce the compatible issue, when upgrade to milvus latest,
the query coord may skip update dist due to the lastModifyTs doesn't
changes. but for old version querynode, the lastModifyTs in
GetDataDistritbuionResponse is always 0, which makes qc skip update
dist. then qc will keep retry the task to watch channel again and again.

this PR add compatible with old version querynode, when lastModifyTs is
0, qc will update it's data distribution.

Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 authored May 27, 2024
1 parent 5b86226 commit 6275c75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/querycoordv2/dist/dist_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (dh *distHandler) handleDistResp(resp *querypb.GetDataDistributionResponse)
node.SetLastHeartbeat(time.Now())

// skip update dist if no distribution change happens in query node
if resp.GetLastModifyTs() <= dh.lastUpdateTs {
if resp.GetLastModifyTs() != 0 && resp.GetLastModifyTs() <= dh.lastUpdateTs {
log.RatedInfo(30, "skip update dist due to no distribution change", zap.Int64("lastModifyTs", resp.GetLastModifyTs()), zap.Int64("lastUpdateTs", dh.lastUpdateTs))
} else {
dh.lastUpdateTs = resp.GetLastModifyTs()
Expand Down

0 comments on commit 6275c75

Please sign in to comment.