Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/Shopify/ghostferry
/ functions
Functions
1,224 in github.com/Shopify/ghostferry
⨍
Functions
1,224
◇
Types & classes
176
↓ 193 callers
Method
query
(sql, exclude_marginalia: false, annotations: [DEFAULT_ANNOTATION])
test/helpers/db_helper.rb:20
↓ 133 callers
Method
Error
(args ...any)
logger.go:21
↓ 133 callers
Method
Errorf
(format string, args ...any)
logger.go:22
↓ 117 callers
Method
Exec
(query string, args ...interface{})
sqlwrapper/ghostferry_db.go:36
↓ 80 callers
Method
String
String returns a human-readable representation for logging and debugging.
pagination_key.go:27
↓ 77 callers
Method
on_status
TODO: eventually we should merge status and callback into a callback system within Ghostferry. Right now the "status" is sent by integrationferry, whe
test/helpers/ghostferry_helper.rb:353
↓ 74 callers
Function
PanicIfError
(err error)
testhelpers/helper_methods.go:15
↓ 74 callers
Method
WithError
(err error)
logger.go:27
↓ 73 callers
Method
Run
()
testhelpers/data_writer.go:102
↓ 57 callers
Function
LogWithField
--- Public factory functions (dispatch to active backend) --- LogWithField creates a new Logger with a single key-value field. This is the primary way
logger.go:120
↓ 56 callers
Method
Info
(args ...any)
logger.go:17
↓ 46 callers
Function
NewUint64Key
(value uint64)
pagination_key.go:45
↓ 46 callers
Method
run
The main method to call to run a Ghostferry subprocess.
test/helpers/ghostferry_helper.rb:97
↓ 43 callers
Method
WithField
(key string, value any)
logger.go:25
↓ 41 callers
Function
SeedInitialData
(db *sql.DB, dbname, tablename string, numberOfRows int)
testhelpers/data_writer.go:60
↓ 37 callers
Method
Add
(entry ReverifyEntry)
iterative_verifier.go:47
↓ 37 callers
Function
NewBinaryKey
(value []byte)
pagination_key.go:106
↓ 36 callers
Method
QueryRow
(query string, args ...interface{})
sqlwrapper/ghostferry_db.go:48
↓ 34 callers
Method
join
test/helpers/data_writer_helper.rb:70
↓ 33 callers
Function
LoadTables
(db *sql.DB, tableFilter TableFilter, columnCompressionConfig ColumnCompressionConfig, columnIgnoreConfig Colu
table_schema_cache.go:153
↓ 30 callers
Method
GetPaginationColumn
GetPaginationColumn retrieves PaginationKeyColumn
table_schema_cache.go:309
↓ 30 callers
Method
run_expecting_interrupt
When using this method, you need to ensure that the datawriter has been stopped properly (if you're using stop_datawriter_during_cutover).
test/helpers/ghostferry_helper.rb:115
↓ 29 callers
Method
Debug
(args ...any)
logger.go:15
↓ 29 callers
Function
NewTestFerry
()
testhelpers/test_ferry.go:68
↓ 28 callers
Method
Fatal
(from string, err error)
error_handler.go:15
↓ 28 callers
Method
prepare
(sql, exclude_marginalia: false, annotations: [DEFAULT_ANNOTATION])
test/helpers/db_helper.rb:29
↓ 25 callers
Function
SetLogBackend
SetLogBackend switches the active logging backend. This should be called once at program startup, before any loggers are created. If an unknown backen
logger.go:101
↓ 24 callers
Method
Run
(context.Context)
throttler.go:17
↓ 23 callers
Method
Query
(query string, args ...interface{})
sqlwrapper/ghostferry_db.go:44
↓ 23 callers
Method
WithFields
(fields Fields)
logger.go:26
↓ 22 callers
Method
SQLValue
SQLValue returns the value to use in SQL WHERE clauses (e.g., WHERE id > ?).
pagination_key.go:19
↓ 22 callers
Method
ValidateConfig
()
config.go:826
↓ 20 callers
Method
Wait
Wait for the verifier until it finishes verification after it was started with the StartInBackground. A verification is "done" when it verified the d
verifier.go:73
↓ 19 callers
Function
SetLogLevel
SetLogLevel sets the global log level for the active backend.
logger.go:153
↓ 19 callers
Method
TableSchema
()
dml_events.go:75
↓ 18 callers
Method
Get
()
utils.go:80
↓ 18 callers
Method
Run
()
testhelpers/integration_test_case.go:34
↓ 17 callers
Method
AsSlice
()
table_schema_cache.go:317
↓ 17 callers
Method
Initialize
()
testhelpers/test_ferry.go:76
↓ 17 callers
Function
QuotedTableNameFromString
(database, table string)
table_schema_cache.go:124
↓ 17 callers
Method
Throttled
()
throttler.go:13
↓ 16 callers
Method
AsSQLString
(string, string)
dml_events.go:76
↓ 16 callers
Method
BuildSelect
BuildSelect is used to set up the query used for batch data copying, allowing for restricting copying to a subset of data. Returning an error here wil
filter.go:18
↓ 16 callers
Method
GetHashes
(ids []uint64)
test/go/iterative_verifier_test.go:350
↓ 16 callers
Method
SendStatusAndWaitUntilContinue
========================================= Code for integration server communication =========================================
test/lib/go/integrationferry/ferry.go:55
↓ 16 callers
Method
Wait
()
testhelpers/data_writer.go:104
↓ 15 callers
Function
LogWithFields
LogWithFields creates a new Logger with multiple key-value fields.
logger.go:128
↓ 15 callers
Function
SetupTest
()
testhelpers/unit_test_suite.go:15
↓ 14 callers
Function
QuoteField
(field string)
utils.go:276
↓ 14 callers
Method
SqlDB
(logger Logger)
config.go:169
↓ 14 callers
Method
Warn
(args ...any)
logger.go:19
↓ 14 callers
Function
WithRetries
(maxRetries int, sleep time.Duration, logger Logger, verb string, f func() error)
utils.go:20
↓ 13 callers
Method
BinlogPosition
()
dml_events.go:80
↓ 13 callers
Function
DbApplicabilityFilter
(applicableDbs []string)
testhelpers/test_table_filter.go:26
↓ 13 callers
Method
InsertRowInDb
(id int, data string, db *sql.DB)
test/go/iterative_verifier_test.go:312
↓ 13 callers
Function
SetLogJSONFormatter
SetLogJSONFormatter configures the active backend to output JSON. For zerolog this is a no-op since JSON is the default format.
logger.go:163
↓ 13 callers
Function
errorAndExit
(msg string)
sharding/cmd/main.go:69
↓ 13 callers
Method
run_with_logs
(resuming_state = nil)
test/helpers/ghostferry_helper.rb:133
↓ 13 callers
Function
useBackend
useBackend switches backend, sets debug level, and directs output to buf.
test/go/logger_test.go:47
↓ 11 callers
Method
AddEventListener
(listener func([]DMLEvent) error)
binlog_streamer.go:335
↓ 11 callers
Method
Compare
Compare returns -1, 0, or 1 if this key is less than, equal to, or greater than other.
pagination_key.go:23
↓ 11 callers
Method
Count
(key string, value int64, tags []MetricTag, sampleRate float64)
metrics.go:48
↓ 11 callers
Method
Infof
(format string, args ...any)
logger.go:18
↓ 11 callers
Function
NewBinlogInsertEvents
(eventBase *DMLEventBase, rowsEvent *replication.RowsEvent)
dml_events.go:149
↓ 11 callers
Method
Table
()
dml_events.go:74
↓ 11 callers
Method
Values
()
row_batch.go:25
↓ 10 callers
Function
AddTenantID
(db *sql.DB, dbName, tableName string, numberOfTenants int)
testhelpers/data_writer.go:89
↓ 10 callers
Method
ColumnName
ColumnName returns the column name this key belongs to, if known.
pagination_key.go:21
↓ 10 callers
Method
InsertCompressedRowInDb
(id int, data string, db *sql.DB)
test/go/iterative_verifier_test.go:317
↓ 10 callers
Function
errorAndExit
(msg string)
copydb/cmd/main.go:29
↓ 10 callers
Method
now
test/helpers/ghostferry_helper.rb:418
↓ 10 callers
Method
send_signal
(signal)
test/helpers/ghostferry_helper.rb:365
↓ 9 callers
Method
Measure
(key string, tags []MetricTag, sampleRate float64, f func())
metrics.go:91
↓ 9 callers
Function
NewDMLEventBase
(table *TableSchema, pos, resumablePos mysql.Position, query []byte, timestamp time.Time)
dml_events.go:134
↓ 9 callers
Function
NewPaginationKeyFromRow
NewPaginationKeyFromRow extracts a pagination key from a row at the given index. It determines the appropriate key type based on the column schema.
pagination_key.go:257
↓ 9 callers
Function
NewUint64KeyWithColumn
(column string, value uint64)
pagination_key.go:49
↓ 9 callers
Method
PaginationKeyIndex
()
row_batch.go:42
↓ 9 callers
Method
Rollback
()
cursor.go:32
↓ 9 callers
Method
VerifyDuringCutover
This is called during cutover and should give the result of the verification.
verifier.go:59
↓ 9 callers
Method
full_table_name
(db, table)
test/helpers/db_helper.rb:39
↓ 9 callers
Function
setLag
(throttler *ghostferry.LagThrottler, serverId int, lag float32)
test/go/lag_throttler_test.go:47
↓ 8 callers
Function
AnnotateStmt
AnnotateStmt annotates a single SQL statement with the configured marginalia. *NOTE* This is NOT SAFE to use with multiple SQL statements as it naive
sqlwrapper/ghostferry_db.go:107
↓ 8 callers
Method
ConnectBinlogStreamerToMysql
()
binlog_streamer.go:112
↓ 8 callers
Function
UnmarshalPaginationKey
(data []byte)
pagination_key.go:187
↓ 8 callers
Method
Validate
()
config.go:131
↓ 8 callers
Method
ensureInitialized
()
ferry.go:1097
↓ 8 callers
Function
getBackend
getBackend returns the currently active backend type.
logger.go:93
↓ 8 callers
Method
term_and_wait_for_exit
test/helpers/ghostferry_helper.rb:378
↓ 7 callers
Method
AddBatchListener
(listener func(*RowBatch) error)
data_iterator.go:199
↓ 7 callers
Method
AllTableNames
()
table_schema_cache.go:325
↓ 7 callers
Method
Annotation
()
dml_events.go:82
↓ 7 callers
Method
Database
()
dml_events.go:73
↓ 7 callers
Method
FingerprintQuery
This query returns the MD5 hash for a row on this table. This query is valid for both the source and the target shard. Any compressed columns specifi
table_schema_cache.go:60
↓ 7 callers
Method
Gauge
(key string, value float64, tags []MetricTag, sampleRate float64)
metrics.go:64
↓ 7 callers
Method
GetBatchSize
(schemaName string, tableName string)
cursor.go:66
↓ 7 callers
Function
GetLogBackend
GetLogBackend returns the currently active logging backend.
logger.go:112
↓ 7 callers
Method
InsertRow
(id int, data string)
test/go/iterative_verifier_test.go:308
↓ 7 callers
Function
LogWithError
LogWithError creates a new Logger with an error field.
logger.go:136
↓ 7 callers
Function
MaxPaginationKey
(column *schema.TableColumn)
pagination_key.go:233
↓ 7 callers
Function
MinPaginationKey
(column *schema.TableColumn)
pagination_key.go:219
next →
1–100 of 1,224, ranked by callers