From ac64d4a90f2c66dba353bee46a2a19041fda603c Mon Sep 17 00:00:00 2001 From: dydxwill <119354122+dydxwill@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:48:17 -0400 Subject: [PATCH] Bump grpc stream flag default values (#2051) --- protocol/app/flags/flags.go | 4 ++-- protocol/app/flags/flags_test.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/protocol/app/flags/flags.go b/protocol/app/flags/flags.go index bdbe34a514..74d72e46a9 100644 --- a/protocol/app/flags/flags.go +++ b/protocol/app/flags/flags.go @@ -64,8 +64,8 @@ const ( DefaultGrpcStreamingEnabled = false DefaultGrpcStreamingFlushIntervalMs = 50 - DefaultGrpcStreamingMaxBatchSize = 2000 - DefaultGrpcStreamingMaxChannelBufferSize = 2000 + DefaultGrpcStreamingMaxBatchSize = 1000000 + DefaultGrpcStreamingMaxChannelBufferSize = 1000000 DefaultVEOracleEnabled = true DefaultOptimisticExecutionEnabled = false diff --git a/protocol/app/flags/flags_test.go b/protocol/app/flags/flags_test.go index 8260efe313..3aac1ebed7 100644 --- a/protocol/app/flags/flags_test.go +++ b/protocol/app/flags/flags_test.go @@ -80,8 +80,8 @@ func TestValidate(t *testing.T) { GrpcEnable: true, GrpcStreamingEnabled: true, GrpcStreamingFlushIntervalMs: 100, - GrpcStreamingMaxBatchSize: 2000, - GrpcStreamingMaxChannelBufferSize: 2000, + GrpcStreamingMaxBatchSize: 1000000, + GrpcStreamingMaxChannelBufferSize: 1000000, }, }, "success - optimistic execution": { @@ -130,7 +130,7 @@ func TestValidate(t *testing.T) { GrpcEnable: true, GrpcStreamingEnabled: true, GrpcStreamingFlushIntervalMs: 0, - GrpcStreamingMaxBatchSize: 2000, + GrpcStreamingMaxBatchSize: 1000000, }, expectedErr: fmt.Errorf("grpc streaming flush interval must be positive number"), }, @@ -140,7 +140,7 @@ func TestValidate(t *testing.T) { GrpcEnable: true, GrpcStreamingEnabled: true, GrpcStreamingFlushIntervalMs: 100, - GrpcStreamingMaxBatchSize: 2000, + GrpcStreamingMaxBatchSize: 1000000, GrpcStreamingMaxChannelBufferSize: 0, }, expectedErr: fmt.Errorf("grpc streaming channel size must be positive number"), @@ -183,8 +183,8 @@ func TestGetFlagValuesFromOptions(t *testing.T) { expectedGrpcEnable: true, expectedGrpcStreamingEnable: false, expectedGrpcStreamingFlushMs: 50, - expectedGrpcStreamingBatchSize: 2000, - expectedGrpcStreamingMaxChannelBufferSize: 2000, + expectedGrpcStreamingBatchSize: 1000000, + expectedGrpcStreamingMaxChannelBufferSize: 1000000, expectedOptimisticExecutionEnabled: false, }, "Sets values from options": {