Skip to content

Commit b2c7193

Browse files
author
Shlomi Noach
committed
refactored all throttling code into throttler.so
1 parent 23357d0 commit b2c7193

File tree

3 files changed

+307
-270
lines changed

3 files changed

+307
-270
lines changed

go/base/context.go

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -108,34 +108,36 @@ type MigrationContext struct {
108108
InitiallyDropGhostTable bool
109109
CutOverType CutOver
110110

111-
Hostname string
112-
TableEngine string
113-
RowsEstimate int64
114-
RowsDeltaEstimate int64
115-
UsedRowsEstimateMethod RowsEstimateMethod
116-
HasSuperPrivilege bool
117-
OriginalBinlogFormat string
118-
OriginalBinlogRowImage string
119-
InspectorConnectionConfig *mysql.ConnectionConfig
120-
ApplierConnectionConfig *mysql.ConnectionConfig
121-
StartTime time.Time
122-
RowCopyStartTime time.Time
123-
RowCopyEndTime time.Time
124-
LockTablesStartTime time.Time
125-
RenameTablesStartTime time.Time
126-
RenameTablesEndTime time.Time
127-
pointOfInterestTime time.Time
128-
pointOfInterestTimeMutex *sync.Mutex
129-
CurrentLag int64
130-
controlReplicasLagResult mysql.ReplicationLagResult
131-
TotalRowsCopied int64
132-
TotalDMLEventsApplied int64
133-
isThrottled bool
134-
throttleReason string
135-
throttleGeneralCheckResult ThrottleCheckResult
136-
throttleMutex *sync.Mutex
137-
IsPostponingCutOver int64
138-
CountingRowsFlag int64
111+
Hostname string
112+
TableEngine string
113+
RowsEstimate int64
114+
RowsDeltaEstimate int64
115+
UsedRowsEstimateMethod RowsEstimateMethod
116+
HasSuperPrivilege bool
117+
OriginalBinlogFormat string
118+
OriginalBinlogRowImage string
119+
InspectorConnectionConfig *mysql.ConnectionConfig
120+
ApplierConnectionConfig *mysql.ConnectionConfig
121+
StartTime time.Time
122+
RowCopyStartTime time.Time
123+
RowCopyEndTime time.Time
124+
LockTablesStartTime time.Time
125+
RenameTablesStartTime time.Time
126+
RenameTablesEndTime time.Time
127+
pointOfInterestTime time.Time
128+
pointOfInterestTimeMutex *sync.Mutex
129+
CurrentLag int64
130+
controlReplicasLagResult mysql.ReplicationLagResult
131+
TotalRowsCopied int64
132+
TotalDMLEventsApplied int64
133+
isThrottled bool
134+
throttleReason string
135+
throttleGeneralCheckResult ThrottleCheckResult
136+
throttleMutex *sync.Mutex
137+
IsPostponingCutOver int64
138+
CountingRowsFlag int64
139+
AllEventsUpToLockProcessedInjectedFlag int64
140+
CleanupImminentFlag int64
139141

140142
OriginalTableColumns *sql.ColumnList
141143
OriginalTableUniqueKeys [](*sql.UniqueKey)

0 commit comments

Comments
 (0)