bugfix sticky query for old client
@@ -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{
