Skip to content

Commit

Permalink
reduce the buffer size of message queue
Browse files Browse the repository at this point in the history
Signed-off-by: SimFG <[email protected]>
  • Loading branch information
SimFG committed Sep 27, 2024
1 parent 9c8f9c7 commit 10ddbbe
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
10 changes: 6 additions & 4 deletions core/reader/factory_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import (
"github.com/zilliztech/milvus-cdc/core/util"
)

const BufferSize = "4"

type FactoryCreator interface {
NewPmsFactory(cfg *config.PulsarConfig) msgstream.Factory
NewKmsFactory(cfg *config.KafkaConfig) msgstream.Factory
Expand Down Expand Up @@ -74,8 +76,8 @@ func (d *DefaultFactoryCreator) NewPmsFactory(cfg *config.PulsarConfig) msgstrea
EnableClientMetrics: config.NewParamItem("false"),
},
MQCfg: paramtable.MQConfig{
ReceiveBufSize: config.NewParamItem("16"),
MQBufSize: config.NewParamItem("16"),
ReceiveBufSize: config.NewParamItem(BufferSize),
MQBufSize: config.NewParamItem(BufferSize),
},
},
)
Expand All @@ -96,8 +98,8 @@ func (d *DefaultFactoryCreator) NewKmsFactory(cfg *config.KafkaConfig) msgstream
KafkaUseSSL: config.NewParamItem("false"),
},
MQCfg: paramtable.MQConfig{
ReceiveBufSize: config.NewParamItem("16"),
MQBufSize: config.NewParamItem("16"),
ReceiveBufSize: config.NewParamItem(BufferSize),
MQBufSize: config.NewParamItem(BufferSize),
},
},
)
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker/cdc-16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sourceConfig:
tlsKeyPath: deployment/cert/client.key # path to your key file
tlsCACertPath: deployment/cert/ca.pem # path to your CACert file
tlsMinVersion: 1.3
readChanLen: 10
readChanLen: 4
defaultPartitionName: _default
replicateChan: by-dev-replicate-msg
channelNum: 16
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker/cdc-4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sourceConfig:
tlsKeyPath: deployment/cert/client.key # path to your key file
tlsCACertPath: deployment/cert/ca.pem # path to your CACert file
tlsMinVersion: 1.3
readChanLen: 10
readChanLen: 4
defaultPartitionName: _default
replicateChan: by-dev-replicate-msg
channelNum: 4
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker/cdc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sourceConfig:
tlsKeyPath: deployment/cert/client.key # path to your key file
tlsCACertPath: deployment/cert/ca.pem # path to your CACert file
tlsMinVersion: 1.3
readChanLen: 10
readChanLen: 4
defaultPartitionName: _default
replicateChan: by-dev-replicate-msg
pulsar:
Expand Down
2 changes: 1 addition & 1 deletion doc/cdc-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ sourceConfig:
# default partition name
defaultPartitionName: _default
# read buffer length, mainly used for buffering if writing data to milvus-target is slow.
readChanLen: 10
readChanLen: 4
# milvus replicate channel name, which is `{msgChannel.chanNamePrefix.cluster}/{msgChannel.chanNamePrefix.replicateMsg}` in the milvus.yaml file
replicateChan: by-dev-replicate-msg
# milvus-source mq config, which is pulsar or kafka
Expand Down
2 changes: 1 addition & 1 deletion server/configs/cdc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sourceConfig:
tlsKeyPath: deployment/cert/client.key # path to your key file
tlsCACertPath: deployment/cert/ca.pem # path to your CACert file
tlsMinVersion: 1.3
readChanLen: 10
readChanLen: 4
defaultPartitionName: _default
replicateChan: by-dev-replicate-msg
pulsar:
Expand Down

0 comments on commit 10ddbbe

Please sign in to comment.