Skip to content

Commit 8786f00

Browse files
authored
Remove query consistency level from request (#452)
1 parent 28a98ad commit 8786f00

File tree

19 files changed

+27
-136
lines changed

19 files changed

+27
-136
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ protoc: $(PROTO_OUT)
143143
$(foreach PROTO_DIR,$(PROTO_DIRS),protoc --proto_path=$(PROTO_IMPORT) --gogoslick_out=Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:$(PROTO_OUT) $(PROTO_DIR)*.proto$(NEWLINE))
144144

145145
fix-proto-path:
146-
mv -f $(PROTO_OUT)/server/* $(PROTO_OUT) && rm -d $(PROTO_OUT)/server
146+
mv -f $(PROTO_OUT)/server/* $(PROTO_OUT) && rm -rf $(PROTO_OUT)/server
147147

148148
# All gRPC generated service files pathes relative to PROTO_OUT.
149149
PROTO_GRPC_SERVICES = $(patsubst $(PROTO_OUT)/%,%,$(shell find $(PROTO_OUT) -name "service.pb.go"))

common/enums/defaults.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,3 @@ func SetDefaultTaskListKind(f *enumspb.TaskListKind){
4545
*f = enumspb.TASK_LIST_KIND_NORMAL
4646
}
4747
}
48-
49-
// TODO: remove this with corresponding field from request
50-
func SetDefaultQueryConsistencyLevel(f *enumspb.QueryConsistencyLevel){
51-
if *f == enumspb.QUERY_CONSISTENCY_LEVEL_UNSPECIFIED{
52-
*f = enumspb.QUERY_CONSISTENCY_LEVEL_STRONG
53-
}
54-
}
55-

common/service/dynamicconfig/constants.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ var keys = map[Key]string{
245245
ReplicationTaskProcessorNoTaskInitialWait: "history.ReplicationTaskProcessorNoTaskInitialWait",
246246
ReplicationTaskProcessorCleanupInterval: "history.ReplicationTaskProcessorCleanupInterval",
247247
ReplicationTaskProcessorCleanupJitterCoefficient: "history.ReplicationTaskProcessorCleanupJitterCoefficient",
248-
EnableConsistentQuery: "history.EnableConsistentQuery",
249-
EnableConsistentQueryByNamespace: "history.EnableConsistentQueryByNamespace",
250248
MaxBufferedQueryCount: "history.MaxBufferedQueryCount",
251249
MutableStateChecksumGenProbability: "history.mutableStateChecksumGenProbability",
252250
MutableStateChecksumVerifyProbability: "history.mutableStateChecksumVerifyProbability",
@@ -741,10 +739,6 @@ const (
741739
ReplicationTaskProcessorCleanupInterval
742740
// ReplicationTaskProcessorCleanupJitterCoefficient is the jitter for cleanup timer
743741
ReplicationTaskProcessorCleanupJitterCoefficient
744-
// EnableConsistentQuery indicates if consistent query is enabled for the cluster
745-
EnableConsistentQuery
746-
// EnableConsistentQueryByNamespace indicates if consistent query is enabled for a namespace
747-
EnableConsistentQueryByNamespace
748742
// MaxBufferedQueryCount indicates the maximum number of queries which can be buffered at a given time for a single workflow
749743
MaxBufferedQueryCount
750744
// MutableStateChecksumGenProbability is the probability [0-100] that checksum will be generated for mutable state

config/dynamicconfig/development.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ frontend.enableClientVersionCheck:
44
system.minRetentionDays:
55
- value: 0
66
constraints: {}
7-
history.EnableConsistentQueryByNamespace:
8-
- value: true
9-
constraints: {}
107
history.persistenceMaxQPS:
118
- value: 3000
129
constraints: {}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ require (
6565
github.com/urfave/cli v1.22.4
6666
github.com/valyala/fastjson v1.5.1
6767
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
68-
go.temporal.io/temporal v0.24.2
69-
go.temporal.io/temporal-proto v0.24.2
68+
go.temporal.io/temporal v0.24.3
69+
go.temporal.io/temporal-proto v0.24.3
7070
go.uber.org/atomic v1.6.0
7171
go.uber.org/multierr v1.5.0
7272
go.uber.org/zap v1.15.0

go.sum

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ github.com/cactus/go-statsd-client/statsd v0.0.0-20200423205355-cb0885a1018c/go.
6767
github.com/cch123/elasticsql v1.0.1 h1:B/c40hmj/TxqjLrpry565J+poi0S2b2NjGOUWmyI+2Q=
6868
github.com/cch123/elasticsql v1.0.1/go.mod h1:x1Ew690FkNjGn9Fm0asmEqZcteTgx+q3CSwlci8SteQ=
6969
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
70+
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
7071
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
7172
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
73+
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=
7274
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
7375
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
7476
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
@@ -336,10 +338,10 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
336338
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
337339
go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
338340
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
339-
go.temporal.io/temporal v0.24.2 h1:bNcactYPNM67xhfvGhUGDjnx5JjXqdRpIWuU0gIKSlI=
340-
go.temporal.io/temporal v0.24.2/go.mod h1:/2xoMEwehz59QdXFZvfL06hvNeiwgl8yxjl2dOHMZiQ=
341-
go.temporal.io/temporal-proto v0.24.2 h1:XZRX9+kB63jn6crfst2Sth3r8scabEqoXksUQu3q91k=
342-
go.temporal.io/temporal-proto v0.24.2/go.mod h1:upayz+pnLT5z2lzh/qktmSnouTTl+WYcjbMoejagmzU=
341+
go.temporal.io/temporal v0.24.3 h1:BfX2+Eha2Y3J05VEXsCSruZVvKUbkg6FwCadYkeJPFU=
342+
go.temporal.io/temporal v0.24.3/go.mod h1:6kIYe+aO3Glb5RfBSZOyc95niiWm4dZZpfXZlkxqq9A=
343+
go.temporal.io/temporal-proto v0.24.3 h1:ZTmKRv0f1JFYEte5fNzER24qujSd+qHs4wKAVuTv4e0=
344+
go.temporal.io/temporal-proto v0.24.3/go.mod h1:upayz+pnLT5z2lzh/qktmSnouTTl+WYcjbMoejagmzU=
343345
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
344346
go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
345347
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=

host/dynamicconfig.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ var (
4747
dynamicconfig.ReplicationTaskFetcherAggregationInterval: 200 * time.Millisecond,
4848
dynamicconfig.ReplicationTaskFetcherErrorRetryWait: 50 * time.Millisecond,
4949
dynamicconfig.ReplicationTaskProcessorErrorRetryWait: time.Millisecond,
50-
dynamicconfig.EnableConsistentQueryByNamespace: true,
5150
}
5251
)
5352

host/queryworkflow_test.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ package host
2626

2727
import (
2828
"bytes"
29+
"context"
2930
"encoding/binary"
3031
"errors"
3132
"strconv"
@@ -45,7 +46,6 @@ import (
4546
"github.com/temporalio/temporal/common/log/tag"
4647
"github.com/temporalio/temporal/common/payloads"
4748
"github.com/temporalio/temporal/common/rpc"
48-
"github.com/temporalio/temporal/service/history"
4949
)
5050

5151
func (s *integrationSuite) TestQueryWorkflow_Sticky() {
@@ -687,7 +687,6 @@ func (s *integrationSuite) TestQueryWorkflow_Consistent_PiggybackQuery() {
687687
QueryType: queryType,
688688
},
689689
QueryRejectCondition: rejectCondition,
690-
QueryConsistencyLevel: enumspb.QUERY_CONSISTENCY_LEVEL_STRONG,
691690
})
692691
// after the query is answered the signal is handled because query is consistent and since
693692
// signal came before query signal must be handled by the time query returns
@@ -869,7 +868,6 @@ func (s *integrationSuite) TestQueryWorkflow_Consistent_Timeout() {
869868
QueryType: queryType,
870869
},
871870
QueryRejectCondition: rejectCondition,
872-
QueryConsistencyLevel: enumspb.QUERY_CONSISTENCY_LEVEL_STRONG,
873871
})
874872
cancel()
875873
queryResultCh <- QueryResult{Resp: queryResp, Err: err}
@@ -1031,7 +1029,6 @@ func (s *integrationSuite) TestQueryWorkflow_Consistent_BlockedByStarted_NonStic
10311029
QueryType: queryType,
10321030
},
10331031
QueryRejectCondition: rejectCondition,
1034-
QueryConsistencyLevel: enumspb.QUERY_CONSISTENCY_LEVEL_STRONG,
10351032
})
10361033
s.True(handledSignal.Load())
10371034
queryResultCh <- QueryResult{Resp: queryResp, Err: err}
@@ -1221,7 +1218,6 @@ func (s *integrationSuite) TestQueryWorkflow_Consistent_NewDecisionTask_Sticky()
12211218
QueryType: queryType,
12221219
},
12231220
QueryRejectCondition: rejectCondition,
1224-
QueryConsistencyLevel: enumspb.QUERY_CONSISTENCY_LEVEL_STRONG,
12251221
})
12261222
s.True(handledSignal.Load())
12271223
queryResultCh <- QueryResult{Resp: queryResp, Err: err}
@@ -1342,15 +1338,16 @@ func (s *integrationSuite) TestQueryWorkflow_BeforeFirstDecision() {
13421338
RunId: we.RunId,
13431339
}
13441340

1345-
// query workflow without any decision task should produce an error
1346-
queryResp, err := s.engine.QueryWorkflow(NewContext(), &workflowservice.QueryWorkflowRequest{
1341+
// query workflow without any decision task should timeout
1342+
ctx, cancel := context.WithTimeout(NewContext(), 1 * time.Second)
1343+
defer cancel()
1344+
queryResp, err := s.engine.QueryWorkflow(ctx, &workflowservice.QueryWorkflowRequest{
13471345
Namespace: s.namespace,
13481346
Execution: workflowExecution,
13491347
Query: &querypb.WorkflowQuery{
13501348
QueryType: queryType,
13511349
},
1352-
QueryConsistencyLevel: enumspb.QUERY_CONSISTENCY_LEVEL_EVENTUAL,
13531350
})
13541351
s.IsType(&workflowservice.QueryWorkflowResponse{}, queryResp)
1355-
s.IsType(history.ErrQueryWorkflowBeforeFirstDecision, err)
1352+
s.IsType(&serviceerror.DeadlineExceeded{}, err)
13561353
}

proto/internal/server/adminservice/v1/request_response.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ message DescribeClusterRequest {
170170
}
171171

172172
message DescribeClusterResponse {
173-
temporal.version.v1.SupportedClientVersions supported_client_versions = 1;
173+
temporal.version.v1.SupportedSDKVersions supported_client_versions = 1;
174174
server.cluster.v1.MembershipInfo membership_info = 2;
175175
}
176176

proto/temporal-proto

0 commit comments

Comments
 (0)