diff --git a/br/pkg/lightning/mydump/region.go b/br/pkg/lightning/mydump/region.go index d5d5b06f9ded4..796a09a38a3f3 100644 --- a/br/pkg/lightning/mydump/region.go +++ b/br/pkg/lightning/mydump/region.go @@ -35,6 +35,7 @@ const ( // the increment ratio of large CSV file size threshold by `region-split-size` largeCSVLowerThresholdRation = 10 // TableFileSizeINF for compressed size, for lightning 10TB is a relatively big value and will strongly affect efficiency + // It's used to make sure compressed files can be read until EOF. Because we can't get the exact decompressed size of the compressed files. TableFileSizeINF = 10 * 1024 * tableRegionSizeWarningThreshold ) @@ -300,7 +301,7 @@ func MakeSourceFileRegion( // set fileSize to INF to make sure compressed files can be read until EOF. Because we can't get the exact size of the compressed files. // TODO: update progress bar calculation for compressed files. if fi.FileMeta.Compression != CompressionNone { - rowIDMax = fileSize * 100 / divisor + rowIDMax = fileSize * 100 / divisor // FIXME: this is not accurate. Need more tests and fix solution. fileSize = TableFileSizeINF } tableRegion := &TableRegion{