File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ package logic
2+
3+ import (
4+ "github.com/github/gh-ost/go/mysql"
5+ "github.com/github/gh-ost/go/sql"
6+ "time"
7+ )
8+
9+ // Checkpoint holds state necessary to resume a migration.
10+ type Checkpoint struct {
11+ Id int64
12+ Timestamp time.Time
13+ LastTrxCoords mysql.BinlogCoordinates
14+ IterationRangeMin * sql.ColumnValues
15+ IterationRangeMax * sql.ColumnValues
16+ Iteration int64
17+ }
Original file line number Diff line number Diff line change @@ -1394,6 +1394,7 @@ func (this *Migrator) onApplyEventStruct(eventStruct *applyEventStruct) error {
13941394}
13951395
13961396func (this * Migrator ) Checkpoint (ctx context.Context ) (* Checkpoint , error ) {
1397+ // TODO: doesn't work if no DML events come in
13971398 coords := this .eventsStreamer .GetCurrentBinlogCoordinates ()
13981399 this .applier .LastIterationRangeMutex .Lock ()
13991400 if this .applier .LastIterationRangeMaxValues == nil || this .applier .LastIterationRangeMinValues == nil {
You can’t perform that action at this time.
0 commit comments