Extractor is the main schema extract flow manager.
| 42 | |
| 43 | // Extractor is the main schema extract flow manager. |
| 44 | type Extractor struct { |
| 45 | execCtx *common.ExecContext |
| 46 | logger g.LoggerType |
| 47 | subject string |
| 48 | mysqlContext *common.MySQLDriverConfig |
| 49 | tableSpecs []*common.TableSpec |
| 50 | |
| 51 | systemVariables map[string]string |
| 52 | sqlMode string |
| 53 | lowerCaseTableNames mysqlconfig.LowerCaseTableNamesValue |
| 54 | MySQLVersion string |
| 55 | TotalTransferredBytes int |
| 56 | // Original comment: TotalRowsCopied returns the accurate number of rows being copied (affected) |
| 57 | // This is not exactly the same as the rows being iterated via chunks, but potentially close enough. |
| 58 | // TODO What is the difference between mysqlContext.RowsEstimate ? |
| 59 | TotalRowsCopied int64 |
| 60 | extractorQueryCount uint64 |
| 61 | natsAddr string |
| 62 | |
| 63 | mysqlVersionDigit int |
| 64 | db *gosql.DB |
| 65 | singletonDB *gosql.DB |
| 66 | dumpers []*dumper |
| 67 | // db.tb exists when creating the job, for full-copy. |
| 68 | // vs e.mysqlContext.ReplicateDoDb: all user assigned db.tb |
| 69 | replicateDoDb map[string]*common.SchemaContext |
| 70 | dataChannel chan *common.EntryContext |
| 71 | inspector *Inspector |
| 72 | binlogReader *binlog.BinlogReader |
| 73 | initialBinlogCoordinates *common.MySQLCoordinates |
| 74 | currentBinlogCoordinates *common.MySQLCoordinateTx |
| 75 | rowCopyComplete chan bool |
| 76 | rowCopyCompleteFlag int64 |
| 77 | tableCount int |
| 78 | |
| 79 | sendByTimeoutCounter int |
| 80 | sendBySizeFullCounter int |
| 81 | |
| 82 | natsConn *gonats.Conn |
| 83 | waitCh chan *drivers.ExitResult |
| 84 | |
| 85 | shutdown bool |
| 86 | shutdownCh chan struct{} |
| 87 | shutdownLock sync.Mutex |
| 88 | ctx context.Context |
| 89 | |
| 90 | testStub1Delay int64 |
| 91 | |
| 92 | sqleContext *sqle.Context |
| 93 | |
| 94 | // This must be `<-` after `getSchemaTablesAndMeta()`. |
| 95 | gotCoordinateCh chan struct{} |
| 96 | streamerReadyCh chan error |
| 97 | fullCopyDone chan struct{} |
| 98 | storeManager *common.StoreManager |
| 99 | |
| 100 | timestampCtx *TimestampContext |
| 101 |
nothing calls this directly
no outgoing calls
no test coverage detected