Skip to content

Commit

Permalink
fix: Watch channel task may stuck forever until qn become offline
Browse files Browse the repository at this point in the history
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 <wei.liu@zilliz.com>
  • Loading branch information
weiliu1031 committed May 27, 2024
1 parent cb99e3d commit be776a8
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 be776a8

Please sign in to comment.