Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ const (
// MysqlChunkAcceptanceRatio defines the minimum ratio of expected chunks that must be generated
// for the split to be considered valid.
MysqlChunkAcceptanceRatio = float64(0.8)
// SamplePercentMin / SamplePercentMax define the clamped range for TABLESAMPLE /
// SAMPLE BLOCK percentage used by physloc and ROWID chunk boundary estimation.
// 0.01 is the practical floor below which page-level sampling may return zero
// rows; 50 caps worst-case I/O so a bad row-count estimate cannot escalate to a
// near-full scan.
SamplePercentMin = float64(0.01)
SamplePercentMax = float64(50.0)
// SampleRowsPerChunkMultiplier controls sample density: each target chunk gets
// ~10 sample points to pick a boundary from, producing even spacing even when
// blocks/pages are clustered (e.g. freshly inserted rows land on adjacent pages).
SampleRowsPerChunkMultiplier = int64(10)
// PhysLocBoundaryPrefix is prepended to every %%physloc%% hex boundary stored
// in a types.Chunk in MSSQL. It is used to identify physloc reading chunks.
PhysLocBoundaryPrefix = "olake_physloc_"
)

type DriverType string
Expand Down
Loading
Loading