-
Notifications
You must be signed in to change notification settings - Fork 112
Stream configuration #201
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
Stream configuration #201
Conversation
Just update the PR description to give accurate context and implementation overview of the PR |
73acd8f
to
3bdfe16
Compare
3bdfe16
to
db16bae
Compare
7f6df4f
to
f860ddd
Compare
b06e83d
to
2c55e3e
Compare
Updated the description with detailed implementation , hope this help a bit in going through the PR. |
partition, err := m.newPartition(partition.Partition, recovered) | ||
// nil given as configuration means we do not set | ||
// custom stream's configuration. The default broker configuration | ||
// will be used. |
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.
Why do we do this on partition resume?
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.
as (* server) newParition()
signature changes to
func (s *Server) newPartition(protoPartition *proto.Partition, recovered bool, protoStreamsConfig *proto.CustomStreamConfig) (*partition, error)
so I have to pass nil
here
Statement of purpose
The PR is to add support the customizing stream's configuration upon creation.
Currently the following configurations StreamConfiguration are set once for all on broker's level.
When a
CreateStream
request is created, client should have the chance to set the configuration by themselves, which will overwrite the default configuration on the broker level for that stream. This gives the client a lot of flexibility for stream configuration and usage.Implementation details
The idea is to add a new section in
internal.pb.proto
of the server for stream level configuration.And then enrich
CreateStreamRequest
On the API level, the api shall parse the custom stream configuration from
proto.request
to set the configuration properly upon stream'spartition
creation. Default value (set on broker levels) will be used in case these values are unset uponCreateStream
request .Summaries of notable changes:
metadata/addPartition
now changes:partition/newPartition
now changes to, which takesprotoStreamConfig
into account:metadata/AddStream
, before callingaddPartition
, it tries to parse the embedded custom stream config fromprotoStream
Notes on
duration
values.All
duration
type is not supported due to complexity issue withgoogle/protobuf
.As of know,
duration
configuration is used simpleint64
as value and consider this value inmillisecond
time unitRequired
Required PRs:
api
go-client