New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialize reminders as protobuf in state store #7129
Serialize reminders as protobuf in state store #7129
Conversation
/ok-to-perf actor_reminder |
Dapr perf testCommit ref: 1bd249c ✅ Build succeeded
✅ Infrastructure deployed
✅ Perf tests succeeded
|
/ok-to-perf workflows |
Dapr perf testCommit ref: 1bd249c ✅ Build succeeded
✅ Infrastructure deployed
✅ Perf tests succeeded
|
Can attest personally changing JSON to proto several years back has improved Redis throughput x10 on a project I worked on |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7129 +/- ##
==========================================
+ Coverage 64.59% 64.62% +0.03%
==========================================
Files 225 226 +1
Lines 21110 21191 +81
==========================================
+ Hits 13635 13694 +59
- Misses 6307 6319 +12
- Partials 1168 1178 +10 ☔ View full report in Codecov by Sentry. |
I really like this change. It is a quick life improvement to users before we can offer a v2 experience for reminders. |
c904b69
to
b4fcb3a
Compare
/ok-to-perf workflows |
/ok-to-perf actor_reminder |
/ok-to-test |
Dapr perf testCommit ref: a9a376e ✅ Build succeeded
✅ Infrastructure deployed
✅ Perf tests succeeded
|
Dapr perf testCommit ref: a9a376e ✅ Build succeeded
✅ Infrastructure deployed
✅ Perf tests succeeded
|
Dapr E2E testCommit ref: a9a376e ✅ Build succeeded for linux/amd64
✅ Infrastructure deployed
✅ Build succeeded for windows/amd64
✅ Tests succeeded on windows/amd64
✅ Tests succeeded on linux/amd64
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the change is something that will be extremely useful. Please add version skew tests for this feature.
I'll see what I can do after I'm back next week. The current setup for version skew tests doesn't allow testing for something like this. We may need some creative thinking. |
…API level Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Josh van Leeuwen <me@joshvanl.dev> Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
I don't know what to say... Maybe more tests now are using more CPU and we're exhausting resources? |
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
// CreateStateTables creates the state tables in a new SQLite DB. | ||
func (s *SQLite) CreateStateTables(t *testing.T) { | ||
require.NotNil(t, s.conn, "Cannot perform if connection isn't active") | ||
_, err := s.conn.Exec(` | ||
CREATE TABLE metadata ( | ||
key text NOT NULL PRIMARY KEY, | ||
value text NOT NULL | ||
); | ||
INSERT INTO metadata VALUES('migrations','1'); | ||
CREATE TABLE state ( | ||
key TEXT NOT NULL PRIMARY KEY, | ||
value TEXT NOT NULL, | ||
is_binary BOOLEAN NOT NULL, | ||
etag TEXT NOT NULL, | ||
expiration_time TIMESTAMP DEFAULT NULL, | ||
update_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
);`) | ||
require.NoError(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Daprd is not running at this point.
The error is because of the actor rebalancing test. You can see this here https://github.com/JoshVanL/dapr/actions/runs/7060286640/job/19219678365?pr=28 |
I don't see the actor rebalancing test failing there? I see that the failures are: |
Indeed, the rebalancing test has been disabled on that run https://github.com/JoshVanL/dapr/pull/28/files#diff-3cd7e807d7e6af5f4ef237072fabae2d4e158f9212c2ea314b6b1cb1cbe0a47d |
…serialize-protobuf Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
@ItalyPaleAle once you address existing comments I think we'll be good to merge, brief review LGTM. |
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
The second bug in the reminders rebalancing IT should be fixed by d25832b |
var sent bool | ||
for { | ||
// When the stream ends (which happens when the context is canceled) this returns an error and we can return | ||
o, rerr := stream.Recv() | ||
if rerr != nil { | ||
errCh <- fmt.Errorf("error from placement: %w", rerr) | ||
if !sent { | ||
errCh <- fmt.Errorf("error from placement: %w", rerr) | ||
} | ||
return | ||
} | ||
if o.GetOperation() == "update" { | ||
if o.GetOperation() == "update" && !sent { | ||
errCh <- nil | ||
return | ||
sent = true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes introduce a data race in the code. Please also open a separate PR for fixes #7250 with a description as to why the error began appearing and whey this code fixes this problem.
==================
WARNING: DATA RACE
Write at 0x00c0005bec10 by goroutine 104:
runtime.slicecopy()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/runtime/slice.go:310 +0x0
bytes.(*Buffer).Read()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/bytes/buffer.go:328 +0x16c
google.golang.org/grpc/internal/transport.(*recvBufferReader).readAdditional()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:219 +0xfc
google.golang.org/grpc/internal/transport.(*recvBufferReader).readClient()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:210 +0xf0
google.golang.org/grpc/internal/transport.(*recvBufferReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:171 +0x2bc
google.golang.org/grpc/internal/transport.(*transportReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:506 +0x5c
io.ReadAtLeast()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:335 +0xc8
io.ReadFull()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:354 +0xe8
google.golang.org/grpc/internal/transport.(*Stream).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:490 +0xc4
google.golang.org/grpc.(*parser).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:600 +0x5c
google.golang.org/grpc.recvAndDecompress()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:730 +0x4c
google.golang.org/grpc.recv()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:796 +0x84
google.golang.org/grpc.(*csAttempt).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:1084 +0x3a8
google.golang.org/grpc.(*clientStream).RecvMsg.func1()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:927 +0x4c
google.golang.org/grpc.(*clientStream).withRetry()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:760 +0x360
google.golang.org/grpc.(*clientStream).RecvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:926 +0xe4
github.com/dapr/dapr/pkg/proto/placement/v1.(*placementReportDaprStatusClient).Recv()
/home/josh/go/src/github.com/dapr/dapr/pkg/proto/placement/v1/placement_grpc.pb.go:62 +0x64
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement.func1()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:412 +0x50
Previous read at 0x00c0005bec12 by goroutine 228:
encoding/binary.bigEndian.Uint32()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/encoding/binary/binary.go:158 +0xd4
google.golang.org/grpc.(*parser).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:605 +0x70
google.golang.org/grpc.recvAndDecompress()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:730 +0x4c
google.golang.org/grpc.recv()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:796 +0x84
google.golang.org/grpc.(*csAttempt).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:1084 +0x3a8
google.golang.org/grpc.(*clientStream).RecvMsg.func1()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:927 +0x4c
google.golang.org/grpc.(*clientStream).withRetry()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:760 +0x360
google.golang.org/grpc.(*clientStream).RecvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:926 +0xe4
github.com/dapr/dapr/pkg/proto/placement/v1.(*placementReportDaprStatusClient).Recv()
/home/josh/go/src/github.com/dapr/dapr/pkg/proto/placement/v1/placement_grpc.pb.go:62 +0x64
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement.func1()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:412 +0x50
Goroutine 104 (running) created at:
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:408 +0x2b8
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).getPlacementClient()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:373 +0x3bc
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).Run.func7()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:116 +0x58
Goroutine 228 (running) created at:
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:408 +0x2b8
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).Run.func4()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:186 +0xb8
==================
==================
WARNING: DATA RACE
Write at 0x00c0000f2d48 by goroutine 104:
google.golang.org/grpc/internal/transport.(*recvBufferReader).readAdditional()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:224 +0x254
google.golang.org/grpc/internal/transport.(*recvBufferReader).readClient()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:210 +0xf0
google.golang.org/grpc/internal/transport.(*recvBufferReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:171 +0x2bc
google.golang.org/grpc/internal/transport.(*transportReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:506 +0x5c
io.ReadAtLeast()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:335 +0xc8
io.ReadFull()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:354 +0xe8
google.golang.org/grpc/internal/transport.(*Stream).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:490 +0xc4
google.golang.org/grpc.(*parser).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:600 +0x5c
google.golang.org/grpc.recvAndDecompress()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:730 +0x4c
google.golang.org/grpc.recv()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:796 +0x84
google.golang.org/grpc.(*csAttempt).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:1084 +0x3a8
google.golang.org/grpc.(*clientStream).RecvMsg.func1()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:927 +0x4c
google.golang.org/grpc.(*clientStream).withRetry()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:760 +0x360
google.golang.org/grpc.(*clientStream).RecvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:926 +0xe4
github.com/dapr/dapr/pkg/proto/placement/v1.(*placementReportDaprStatusClient).Recv()
/home/josh/go/src/github.com/dapr/dapr/pkg/proto/placement/v1/placement_grpc.pb.go:62 +0x64
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement.func1()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:412 +0x50
Previous write at 0x00c0000f2d48 by goroutine 228:
google.golang.org/grpc/internal/transport.(*recvBufferReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:166 +0x258
google.golang.org/grpc/internal/transport.(*transportReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:506 +0x5c
io.ReadAtLeast()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:335 +0xc8
io.ReadFull()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:354 +0xe8
google.golang.org/grpc/internal/transport.(*Stream).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:490 +0xc4
google.golang.org/grpc.(*parser).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:617 +0x180
google.golang.org/grpc.recvAndDecompress()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:730 +0x4c
google.golang.org/grpc.recv()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:796 +0x84
google.golang.org/grpc.(*csAttempt).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:1084 +0x3a8
google.golang.org/grpc.(*clientStream).RecvMsg.func1()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:927 +0x4c
google.golang.org/grpc.(*clientStream).withRetry()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:760 +0x360
google.golang.org/grpc.(*clientStream).RecvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:926 +0xe4
github.com/dapr/dapr/pkg/proto/placement/v1.(*placementReportDaprStatusClient).Recv()
/home/josh/go/src/github.com/dapr/dapr/pkg/proto/placement/v1/placement_grpc.pb.go:62 +0x64
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement.func1()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:412 +0x50
Goroutine 104 (running) created at:
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:408 +0x2b8
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).getPlacementClient()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:373 +0x3bc
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).Run.func7()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:116 +0x58
Goroutine 228 (running) created at:
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:408 +0x2b8
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).Run.func4()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:186 +0xb8
==================
==================
WARNING: DATA RACE
Write at 0x00c0000f2d50 by goroutine 104:
google.golang.org/grpc/internal/transport.(*recvBufferReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:171 +0x2d0
google.golang.org/grpc/internal/transport.(*transportReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:506 +0x5c
io.ReadAtLeast()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:335 +0xc8
io.ReadFull()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:354 +0xe8
google.golang.org/grpc/internal/transport.(*Stream).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:490 +0xc4
google.golang.org/grpc.(*parser).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:600 +0x5c
google.golang.org/grpc.recvAndDecompress()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:730 +0x4c
google.golang.org/grpc.recv()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:796 +0x84
google.golang.org/grpc.(*csAttempt).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:1084 +0x3a8
google.golang.org/grpc.(*clientStream).RecvMsg.func1()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:927 +0x4c
google.golang.org/grpc.(*clientStream).withRetry()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:760 +0x360
google.golang.org/grpc.(*clientStream).RecvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:926 +0xe4
github.com/dapr/dapr/pkg/proto/placement/v1.(*placementReportDaprStatusClient).Recv()
/home/josh/go/src/github.com/dapr/dapr/pkg/proto/placement/v1/placement_grpc.pb.go:62 +0x64
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement.func1()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:412 +0x50
Previous read at 0x00c0000f2d50 by goroutine 228:
google.golang.org/grpc/internal/transport.(*recvBufferReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:158 +0x44
google.golang.org/grpc/internal/transport.(*transportReader).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:506 +0x5c
io.ReadAtLeast()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:335 +0xc8
io.ReadFull()
/nix/store/7y75b2ac80chlh6knld3943y46n3v9kf-go-1.21.4/share/go/src/io/io.go:354 +0xe8
google.golang.org/grpc/internal/transport.(*Stream).Read()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/internal/transport/transport.go:490 +0xc4
google.golang.org/grpc.(*parser).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:617 +0x180
google.golang.org/grpc.recvAndDecompress()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:730 +0x4c
google.golang.org/grpc.recv()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/rpc_util.go:796 +0x84
google.golang.org/grpc.(*csAttempt).recvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:1084 +0x3a8
google.golang.org/grpc.(*clientStream).RecvMsg.func1()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:927 +0x4c
google.golang.org/grpc.(*clientStream).withRetry()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:760 +0x360
google.golang.org/grpc.(*clientStream).RecvMsg()
/home/josh/go/pkg/mod/google.golang.org/grpc@v1.59.0/stream.go:926 +0xe4
github.com/dapr/dapr/pkg/proto/placement/v1.(*placementReportDaprStatusClient).Recv()
/home/josh/go/src/github.com/dapr/dapr/pkg/proto/placement/v1/placement_grpc.pb.go:62 +0x64
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement.func1()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:412 +0x50
Goroutine 104 (running) created at:
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:408 +0x2b8
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).getPlacementClient()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:373 +0x3bc
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).Run.func7()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:116 +0x58
Goroutine 228 (running) created at:
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).reportStatusToPlacement()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:408 +0x2b8
github.com/dapr/dapr/tests/integration/suite/actors/reminders.(*rebalancing).Run.func4()
/home/josh/go/src/github.com/dapr/dapr/tests/integration/suite/actors/reminders/rebalancing.go:186 +0xb8
==================
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this race condition exists in master too. I'll fix it in another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not get a race condition for this test on master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The race condition is due to concurrent recv
and send
in the gRPC channel. Not sure why it doesn't appear on master (maybe because the background goroutine was terminated on the first message?) but that's not new code. Fixing that requires creating 2 separate streams and it's a moderately-sized code change. Can be fixed later
Looks like the race condition is another bug in that test case (only in test code) that predates this PR. Fix doesn't seem immediate, but I can look into fixing that in a separate PR. The remaining comments are about nits on test code, including naming, and can be fixed separately if needed. Looking forward getting this PR merged to fix the perf and integration tests failing in the master branch for many weeks :) |
There might be 2 different issues here, so I don't want to dismiss the race condition in this PR or a bug in the test code. On the other hand, we should raise our bar in pull requests because our users (and maintainers) are paying a price for that. I suggest we move slower but get the PRs to a mergeable state and avoid "fix later" as much as possible. It is better to move slower in the right direction than fast in the wrong one. |
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Merging this as the race condition is scoped to test code and we're getting close to code freeze. We have a plan with @JoshVanL to follow up with a fix. |
* Added support for reading/writing reminders as protobuf depending on API level Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Increase target QPS Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Added integration tests Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * 💄 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Updated test code per review feedback Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * 💄 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Mod tidy Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Update tests/integration/suite/actors/reminders/serialization_json.go Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> * Update tests/integration/framework/process/daprd/options.go Co-authored-by: Josh van Leeuwen <me@joshvanl.dev> Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> * Changed per review feedback Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Lint Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Should fix the test errors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Lint.... Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Disable ITs on Windows due to SQLite limitations Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --------- Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Josh van Leeuwen <me@joshvanl.dev> Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Part of #6121
Changes how reminders are serialized in the state store, switching from the current JSON serialization to protobuf. Using protobuf is more efficient, not just because the serialization itself is faster, but because the payload is more "compressed" and so the I/O cost (the biggest issue today) is reduced.
Results from the actor_reminder perf test (using Postgres) (higher is better):
Workflow perf test (TestSeriesWorkflowWithMaxVUs - Req Duration P90) (lower is better):
This is the first change that leverages #6838 for real to preserve backwards-compatibility and to be able to function in a cluster with mixed Dapr versions
TODO: