File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,7 @@ func (c *Canal) prepareSyncer() error {
462462 Logger : c .cfg .Logger ,
463463 Dialer : c .cfg .Dialer ,
464464 Localhost : c .cfg .Localhost ,
465+ EventCacheCount : c .cfg .EventCacheCount ,
465466 RowsEventDecodeFunc : func (event * replication.RowsEvent , data []byte ) error {
466467 pos , err := event .DecodeHeader (data )
467468 if err != nil {
Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ type Config struct {
107107
108108 // Set Localhost
109109 Localhost string
110+
111+ // EventCacheCount is the capacity of the BinlogStreamer internal event channel.
112+ // the default value is 10240.
113+ // if you table contain large columns, you can decrease this value to avoid OOM.
114+ EventCacheCount int
110115}
111116
112117func NewConfigWithFile (name string ) (* Config , error ) {
You can’t perform that action at this time.
0 commit comments