-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: move on-demand subscriber to batch service #952
Conversation
de676bc
to
d0f0933
Compare
@@ -1,16 +1,16 @@ | |||
// Copyright 2023 The Bucketeer Authors. | |||
// Copyright 2024 The Bucketeer Authors. |
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.
nit: It shouldn't introduce an extra space here.
bigQueryBatchSize: | ||
timezone: | ||
goalCountEventOPSPersister: | ||
flushSize: 100 |
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.
Please use the following default settings for all the new persisters.
flushSize: 20
flushInterval: 5
flushTimeout: 30
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.
Updated.
project: | ||
topic: | ||
subscription: | ||
pullerNumGoroutines: 5 |
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.
Please use the following default settings for all the new persisters.
pullerNumGoroutines: 5
pullerMaxOutstandingMessages: 1000
pullerMaxOutstandingBytes: 100000000
maxMps: 100
workerNum: 1
checkInterval: 10
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.
Updated.
pkg/batch/subscriber/subscriber.go
Outdated
@@ -64,7 +74,7 @@ type Configuration struct { | |||
WorkerNum int `json:"workerNum"` | |||
} | |||
|
|||
type Subscriber struct { | |||
type NormalSubscriber struct { |
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.
Let's keep the the name Subscriber
.
Also, please make it private.
@@ -103,7 +103,7 @@ func getCodeFromError(err error) string { | |||
return codeUnknown | |||
} | |||
|
|||
func registerMetrics(r metrics.Registerer) { | |||
func RegisterMetrics(r metrics.Registerer) { |
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.
Do we need to make this public?
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.
Yes, since the events dwh persisters need to use bigquery writer, but we can't register the metrics twice, so we have to register bigquery writer metrics when the batch service starting
@@ -1,21 +1,22 @@ | |||
// Copyright 2024 The Bucketeer Authors. | |||
// Copyright 2024 The Bucketeer Authors. |
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.
Please fix the extra space.
@@ -1,33 +1,33 @@ | |||
// Copyright 2024 The Bucketeer Authors. | |||
// Copyright 2024 The Bucketeer Authors. |
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.
Same for the other files.
1e1d74b
to
76d0326
Compare
This reverts commit 12d5b8c.
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.
Thank you!
Part of #405
This PR will upgrade multi PubSub architecture to support on-demand subscriber:
Key Changes
Refactor event persisters
Move storage pkg
pkg/batch/storage
directory. [1] [2] [3] [4]