Skip to content

Commit

Permalink
State store: make BulkSet/BulkDelete not transactional (dapr#6342)
Browse files Browse the repository at this point in the history
* Updated interfaces

Signed-off-by: ItalyPaleAle <[email protected]>

* Add bulk routines for state stores

Signed-off-by: ItalyPaleAle <[email protected]>

* Support passing BulkStoreOpts

Signed-off-by: ItalyPaleAle <[email protected]>

* Updated gRPC APIs

Signed-off-by: ItalyPaleAle <[email protected]>

* 💄

Signed-off-by: ItalyPaleAle <[email protected]>

* Updated HTTP APIs

Signed-off-by: ItalyPaleAle <[email protected]>

* Added replacement to go.mod

Signed-off-by: ItalyPaleAle <[email protected]>

* Updated BulkSet in runtime too

Signed-off-by: ItalyPaleAle <[email protected]>

* Updated pinned contrib

Signed-off-by: ItalyPaleAle <[email protected]>

* Updated test app

Signed-off-by: ItalyPaleAle <[email protected]>

* 💄

Signed-off-by: ItalyPaleAle <[email protected]>

* Working on etag test

Signed-off-by: ItalyPaleAle <[email protected]>

* More tests

Signed-off-by: ItalyPaleAle <[email protected]>

* Completed E2E test for HTTP API

Signed-off-by: ItalyPaleAle <[email protected]>

* Bulk*WithOptions->Bulk*

Signed-off-by: ItalyPaleAle <[email protected]>

* Added E2E tests for gRPC

Signed-off-by: ItalyPaleAle <[email protected]>

* Simplified code

Signed-off-by: ItalyPaleAle <[email protected]>

* Enabled E2E test

Signed-off-by: ItalyPaleAle <[email protected]>

* BulkStoreError contains key and not sequence

Signed-off-by: ItalyPaleAle <[email protected]>

* Updated pinned contrib

Signed-off-by: ItalyPaleAle <[email protected]>

* Pin contrib v1.11.0-rc.4

Signed-off-by: Bernd Verst <[email protected]>

* 💄

Signed-off-by: ItalyPaleAle <[email protected]>

* Fixed SDK test workflow

Signed-off-by: ItalyPaleAle <[email protected]>

* Removed unnecessary go.od

Signed-off-by: ItalyPaleAle <[email protected]>

* Fixed SDK workflow

Signed-off-by: ItalyPaleAle <[email protected]>

* Fix lint.

Signed-off-by: Artur Souza <[email protected]>

---------

Signed-off-by: ItalyPaleAle <[email protected]>
Signed-off-by: Bernd Verst <[email protected]>
Signed-off-by: Artur Souza <[email protected]>
Co-authored-by: Yaron Schneider <[email protected]>
Co-authored-by: Bernd Verst <[email protected]>
Co-authored-by: Artur Souza <[email protected]>
  • Loading branch information
4 people authored May 18, 2023
1 parent f23c727 commit 89a93c9
Show file tree
Hide file tree
Showing 32 changed files with 2,019 additions and 684 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dapr-test-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Checkout p repo to run tests.
- name: Checkout python-sdk repo to run tests.
uses: actions/checkout@v3
with:
repository: dapr/python-sdk
Expand Down
10 changes: 10 additions & 0 deletions dapr/proto/components/v1/state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ message SetRequest {
// reserved for future-proof extensibility
message SetResponse {}

message BulkDeleteRequestOptions {
int64 parallelism = 1;
}

message BulkDeleteRequest {
repeated DeleteRequest items = 1;
BulkDeleteRequestOptions options = 2;
}

// reserved for future-proof extensibility
Expand Down Expand Up @@ -271,8 +276,13 @@ message BulkGetResponse {
repeated BulkStateItem items = 1;
}

message BulkSetRequestOptions {
int64 parallelism = 1;
}

message BulkSetRequest {
repeated SetRequest items = 1;
BulkSetRequestOptions options = 2;
}

// reserved for future-proof extensibility
Expand Down
81 changes: 39 additions & 42 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ require (
github.com/PuerkitoBio/purell v1.2.0
github.com/argoproj/argo-rollouts v1.4.1
github.com/cenkalti/backoff/v4 v4.2.1
github.com/dapr/components-contrib v1.11.0-rc.1
github.com/dapr/kit v0.0.5-0.20230418193628-15a7040dec41
github.com/dapr/components-contrib v1.11.0-rc.4
github.com/dapr/kit v0.0.5
github.com/evanphx/json-patch/v5 v5.6.0
github.com/fasthttp/router v1.4.18
github.com/go-logr/logr v1.2.4
Expand Down Expand Up @@ -39,12 +39,12 @@ require (
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.42.0
github.com/redis/go-redis/v9 v9.0.3
github.com/redis/go-redis/v9 v9.0.4
github.com/sony/gobreaker v0.5.0
github.com/spf13/cast v1.5.0
github.com/spf13/cast v1.5.1
github.com/stretchr/testify v1.8.2
github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde
github.com/valyala/fasthttp v1.45.0
github.com/valyala/fasthttp v1.47.0
go.opencensus.io v0.24.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0
Expand All @@ -55,9 +55,9 @@ require (
go.opentelemetry.io/otel/trace v1.14.0
go.uber.org/automaxprocs v1.5.2
go.uber.org/ratelimit v0.2.0
golang.org/x/exp v0.0.0-20230419192730-864b3d6c5c2c
golang.org/x/net v0.9.0
golang.org/x/sync v0.1.0
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc
golang.org/x/net v0.10.0
golang.org/x/sync v0.2.0
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
google.golang.org/grpc v1.54.0
google.golang.org/protobuf v1.30.0
Expand All @@ -75,21 +75,6 @@ require (
sigs.k8s.io/yaml v1.3.0
)

require (
github.com/apache/thrift v0.13.0 // indirect
github.com/bytedance/gopkg v0.0.0-20220817015305-b879a72dc90f // indirect
github.com/chenzhuoyu/iasm v0.0.0-20230222070914-0b1b64b0e762 // indirect
github.com/choleraehyq/pid v0.0.16 // indirect
github.com/cloudwego/fastpb v0.0.4-0.20230131074846-6fc453d58b96 // indirect
github.com/cloudwego/frugal v0.1.6 // indirect
github.com/cloudwego/kitex v0.5.0 // indirect
github.com/cloudwego/netpoll v0.3.2 // indirect
github.com/cloudwego/thriftgo v0.2.8 // indirect
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 // indirect
github.com/oleiade/lane v1.0.1 // indirect
golang.org/x/arch v0.2.0 // indirect
)

require (
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.19.0 // indirect
Expand All @@ -104,22 +89,22 @@ require (
github.com/99designs/keyring v1.2.1 // indirect
github.com/AthenZ/athenz v1.10.39 // indirect
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.5.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0-beta.5 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/data/azappconfig v0.5.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos v0.3.5-0.20230428192423-86627ae445bc // indirect
github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos v0.3.5 // indirect
github.com/Azure/azure-sdk-for-go/sdk/data/aztables v1.0.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v0.5.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.2.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2 v2.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2 v2.1.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.1.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v0.11.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v0.13.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v0.1.0 // indirect
github.com/Azure/go-amqp v0.18.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v1.0.0 // indirect
github.com/Azure/go-amqp v1.0.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
Expand Down Expand Up @@ -151,25 +136,34 @@ require (
github.com/apache/dubbo-go-hessian2 v1.11.5 // indirect
github.com/apache/pulsar-client-go v0.9.0 // indirect
github.com/apache/rocketmq-client-go/v2 v2.1.2-0.20230412142645-25003f6f083d // indirect
github.com/apache/thrift v0.13.0 // indirect
github.com/ardielle/ardielle-go v1.5.2 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect
github.com/aws/aws-sdk-go v1.44.214 // indirect
github.com/awslabs/kinesis-aggregation/go v0.0.0-20210630091500-54e17340d32f // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/benbjohnson/clock v1.3.4 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.2.0 // indirect
github.com/boltdb/bolt v1.3.1 // indirect
github.com/bradfitz/gomemcache v0.0.0-20230124162541-5f7a7d875746 // indirect
github.com/bufbuild/protocompile v0.4.0 // indirect
github.com/bytedance/gopkg v0.0.0-20220817015305-b879a72dc90f // indirect
github.com/camunda/zeebe/clients/go/v8 v8.1.8 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chebyrash/promise v0.0.0-20220530143319-1123826567d6 // indirect
github.com/chenzhuoyu/iasm v0.0.0-20230222070914-0b1b64b0e762 // indirect
github.com/choleraehyq/pid v0.0.16 // indirect
github.com/clbanning/mxj/v2 v2.5.6 // indirect
github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.13.0 // indirect
github.com/cloudevents/sdk-go/v2 v2.13.0 // indirect
github.com/cloudwego/fastpb v0.0.4-0.20230131074846-6fc453d58b96 // indirect
github.com/cloudwego/frugal v0.1.6 // indirect
github.com/cloudwego/kitex v0.5.0 // indirect
github.com/cloudwego/netpoll v0.3.2 // indirect
github.com/cloudwego/thriftgo v0.2.8 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534 // indirect
github.com/creasty/defaults v1.5.2 // indirect
Expand Down Expand Up @@ -212,7 +206,7 @@ require (
github.com/go-playground/validator/v10 v10.11.0 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/go-zookeeper/zk v1.0.3 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.2 // indirect
Expand All @@ -230,6 +224,7 @@ require (
github.com/google/flatbuffers v2.0.8+incompatible // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
Expand Down Expand Up @@ -315,6 +310,7 @@ require (
github.com/nats-io/nkeys v0.3.0 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/nats-io/stan.go v0.10.4 // indirect
github.com/oleiade/lane v1.0.1 // indirect
github.com/open-policy-agent/opa v0.49.2 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openzipkin/zipkin-go v0.4.1 // indirect
Expand All @@ -338,7 +334,7 @@ require (
github.com/sendgrid/rest v2.6.9+incompatible // indirect
github.com/sendgrid/sendgrid-go v3.12.0+incompatible // indirect
github.com/shirou/gopsutil/v3 v3.22.2 // indirect
github.com/sijms/go-ora/v2 v2.6.11 // indirect
github.com/sijms/go-ora/v2 v2.7.6 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
Expand Down Expand Up @@ -379,14 +375,15 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/term v0.7.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/api v0.115.0 // indirect
Expand All @@ -410,11 +407,11 @@ require (
lukechampine.com/uint128 v1.3.0 // indirect
modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.13 // indirect
modernc.org/libc v1.22.3 // indirect
modernc.org/libc v1.22.6 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.5.0 // indirect
modernc.org/opt v0.1.3 // indirect
modernc.org/sqlite v1.21.1 // indirect
modernc.org/sqlite v1.22.1 // indirect
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.1.0 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
Expand Down
Loading

0 comments on commit 89a93c9

Please sign in to comment.