Skip to content

Commit 532dfb1

Browse files
authored
Add placeholder for dynamo visibilityCRUD methods (cadence-workflow#4244)
1 parent 8d3e54e commit 532dfb1

File tree

3 files changed

+68
-3
lines changed

3 files changed

+68
-3
lines changed

Diff for: common/persistence/nosql/nosqlplugin/cassandra/visibility.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func (db *cdb) DeleteVisibility(ctx context.Context, domainID, workflowID, runID
351351
func (db *cdb) SelectVisibility(ctx context.Context, filter *nosqlplugin.VisibilityFilter) (*nosqlplugin.SelectVisibilityResponse, error) {
352352
switch filter.FilterType {
353353
case nosqlplugin.AllOpen:
354-
return db.openSortedyByStartTime(ctx, &filter.ListRequest)
354+
return db.openSortedByStartTime(ctx, &filter.ListRequest)
355355
case nosqlplugin.AllClosed:
356356
switch filter.SortType {
357357
case nosqlplugin.SortByStartTime:
@@ -523,7 +523,7 @@ func (db *cdb) closedFilteredByClosedStatusSortedByClosedTime(
523523
return processQuery(query, request, readClosedWorkflowExecutionRecord)
524524
}
525525

526-
func (db *cdb) openSortedyByStartTime(
526+
func (db *cdb) openSortedByStartTime(
527527
ctx context.Context,
528528
request *persistence.InternalListWorkflowExecutionsRequest,
529529
) (*nosqlplugin.SelectVisibilityResponse, error) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Copyright (c) 2021 Uber Technologies, Inc.
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in
11+
// all copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
// THE SOFTWARE.
20+
21+
package dynamodb
22+
23+
import (
24+
"context"
25+
26+
"github.com/uber/cadence/common/persistence/nosql/nosqlplugin"
27+
)
28+
29+
func (db *ddb) InsertVisibility(
30+
ctx context.Context,
31+
ttlSeconds int64,
32+
row *nosqlplugin.VisibilityRowForInsert,
33+
) error {
34+
panic("TODO")
35+
}
36+
37+
func (db *ddb) UpdateVisibility(
38+
ctx context.Context,
39+
ttlSeconds int64,
40+
row *nosqlplugin.VisibilityRowForUpdate,
41+
) error {
42+
panic("TODO")
43+
}
44+
45+
func (db *ddb) SelectVisibility(
46+
ctx context.Context,
47+
filter *nosqlplugin.VisibilityFilter,
48+
) (*nosqlplugin.SelectVisibilityResponse, error) {
49+
panic("TODO")
50+
}
51+
52+
func (db *ddb) DeleteVisibility(
53+
ctx context.Context,
54+
domainID, workflowID, runID string,
55+
) error {
56+
panic("TODO")
57+
}
58+
59+
func (db *ddb) SelectOneClosedWorkflow(
60+
ctx context.Context,
61+
domainID, workflowID, runID string,
62+
) (*nosqlplugin.VisibilityRow, error) {
63+
panic("TODO")
64+
}

Diff for: service/history/replication/task_executor_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"github.com/stretchr/testify/require"
3030
"github.com/stretchr/testify/suite"
3131
"github.com/uber-go/tally"
32+
3233
"github.com/uber/cadence/client"
3334
"github.com/uber/cadence/client/admin"
3435
historyClient "github.com/uber/cadence/client/history"
@@ -265,4 +266,4 @@ func (s *taskExecutorSuite) TestProcess_SyncActivityReplicationTask_DifferentSha
265266
s.historyClient.EXPECT().SyncActivity(gomock.Any(), request).Return(nil).Times(2)
266267
_, err := s.taskHandler.execute(task, true)
267268
s.NoError(err)
268-
}
269+
}

0 commit comments

Comments
 (0)