ticdc redo log seems to use S3 in an inefficient style #5924
Labels
question
Further information is requested.
type/enhancement
The issue or PR belongs to an enhancement.
Before asking a question, make sure you have
What is your question?
The code is in
cdc/redo/writer/file.go
.In
Writer.Flush
,Writer.writeToS3
will be finally called.So if
writeToS3
is called multiple times on one local file, same content will be put to S3 multiple times. It will waste lots of network traffic resource.And,
writeToS3
is called with a temp path. After a S3 log file is rotated, it will be renamed withWrite.renameInS3(path.tmp, path)
. However S3 doesn't have a built-inrename
API, so therename
operation is very expensive. We can check it here.Please help me to confirm whether my investigation is correct or not, thanks!
The text was updated successfully, but these errors were encountered: