Skip to content

Commit 6bc376c

Browse files
committed
refactor(cdc): optimize struct memory layout for connector
1 parent f54888d commit 6bc376c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

connector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ type Connector interface {
2828
}
2929

3030
type connector struct {
31+
partitionCache sync.Map
3132
handler Handler
3233
responseHandler elasticsearch.ResponseHandler
3334
cfg *config.Config
34-
cdc cdc.Connector
3535
esClient *es.Client
36+
cdc cdc.Connector
3637
bulk bulk.Indexer
3738
metrics []prometheus.Collector
38-
partitionCache sync.Map
3939
}
4040

4141
func NewConnector(ctx context.Context, cfg config.Config, handler Handler, options ...Option) (Connector, error) {

0 commit comments

Comments
 (0)