diff --git a/service/matching/matchingEngine.go b/service/matching/matchingEngine.go index df7e2dc61ea..1ca93c8d859 100644 --- a/service/matching/matchingEngine.go +++ b/service/matching/matchingEngine.go @@ -33,6 +33,7 @@ import ( workflow "github.com/uber/cadence/.gen/go/shared" "github.com/uber/cadence/client/history" "github.com/uber/cadence/common" + "github.com/uber/cadence/common/client" "github.com/uber/cadence/common/logging" "github.com/uber/cadence/common/metrics" "github.com/uber/cadence/common/persistence" @@ -275,8 +276,14 @@ pollLoop: return emptyPollForDecisionTaskResponse, nil } + clientFeature := client.NewFeatureImpl( + mutableStateResp.GetClientLibraryVersion(), + mutableStateResp.GetClientFeatureVersion(), + mutableStateResp.GetClientImpl(), + ) + isStickyEnabled := false - if len(mutableStateResp.StickyTaskList.GetName()) != 0 { + if len(mutableStateResp.StickyTaskList.GetName()) != 0 && clientFeature.SupportStickyQuery() { isStickyEnabled = true } resp := &h.RecordDecisionTaskStartedResponse{