Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/MongoShake
/ functions
Functions
933 in github.com/alibaba/MongoShake
⨍
Functions
933
◇
Types & classes
171
↓ 308 callers
Method
Errorf
(format string, args ...any)
pkg/log/logger.go:212
↓ 279 callers
Method
Printf
(format string, args ...any)
pkg/log/logger.go:179
↓ 234 callers
Method
Infof
(format string, args ...any)
pkg/log/logger.go:198
↓ 160 callers
Method
BatchMore
BatchMore ** * This function is used to gather oplogs together. * Honestly speaking, it's complicate so that reading unit tests may help you to make
collector/batcher.go:279
↓ 155 callers
Method
Size
()
oplog/txn_buffer.go:75
↓ 126 callers
Function
mockOplogRecord
(oId, oX interface{}, o2Id int)
executor/db_writer_test.go:48
↓ 88 callers
Method
Warnf
(format string, args ...any)
pkg/log/logger.go:205
↓ 66 callers
Method
Error
(format string, args ...any)
pkg/log/logger.go:249
↓ 66 callers
Function
mockOplogs
* * return oplogs array with length=input length. * ddlGiven array marks the ddl. * noopGiven array marks the noop. * sameTsGiven array marks the
collector/batcher_test.go:39
↓ 61 callers
Method
Criticalf
(format string, args ...any)
pkg/log/logger.go:219
↓ 61 callers
Method
Debugf
(format string, args ...any)
pkg/log/logger.go:191
↓ 54 callers
Method
Fatalf
(format string, args ...any)
pkg/log/logger.go:223
↓ 54 callers
Method
Panicf
(format string, args ...any)
pkg/log/logger.go:230
↓ 53 callers
Function
GetKey
(log bson.D, wanted string)
oplog/oplog.go:130
↓ 51 callers
Method
Println
(args ...any)
pkg/log/logger.go:187
↓ 43 callers
Function
FetchAllDocumentBsonM
(client *mongo.Client, testDb string, testCollection string, opts *options.FindOptions)
unit_test_common/common.go:25
↓ 43 callers
Function
mockTransLogs
(op, ns string, logObject bson.D)
executor/executor_test.go:201
↓ 40 callers
Method
Filter
(log *oplog.PartialLog)
collector/filter/oplog_filter.go:16
↓ 38 callers
Function
mockSyncer
()
collector/batcher_test.go:18
↓ 37 callers
Function
mockLogs
(op, ns string, size int, cb bool)
executor/executor_test.go:16
↓ 29 callers
Function
NewBatcher
(syncer *OplogSyncer, filterList filter.OplogFilterChain, handler OplogHandler, workerGroup []*Worker)
collector/batcher.go:96
↓ 29 callers
Method
selectSyncMode
if the oplog of checkpoint timestamp exist in all source db, then only do oplog replication instead of document replication
collector/coordinator/utils.go:144
↓ 28 callers
Function
NewDbWriter
NewDbWriter return a new writer, could be: 1) SingleWriter; 2) BulkWriter; (by default for MongoDB3.2+) 3) CommandWriter; (for gid enabled)
executor/db_writer.go:53
↓ 28 callers
Method
doUpdate
update operation
executor/db_writer.go:32
↓ 26 callers
Method
doInsert
insert operation
executor/db_writer.go:26
↓ 25 callers
Function
objectIdFromInt
(num int64)
executor/db_writer_test.go:77
↓ 25 callers
Function
runByte
(input []byte)
oplog/change_stream_event_test.go:394
↓ 24 callers
Method
Close
()
collector/docsyncer/doc_syncer.go:383
↓ 24 callers
Method
Filter
(log *oplog.PartialLog)
collector/filter/oplog_filter.go:273
↓ 24 callers
Method
Get
Get return persistent checkpoint
collector/ckpt/ckpt_manager.go:60
↓ 24 callers
Method
Read
()
tunnel/kafka/reader.go:48
↓ 23 callers
Method
Transform
(db string)
collector/transform/transform.go:48
↓ 22 callers
Method
String
String return log info
collector/ckpt/ckpt_operation.go:55
↓ 22 callers
Method
Update
Update checkpoint update memory & persistence(db or file)
collector/ckpt/ckpt_manager.go:84
↓ 21 callers
Function
NewNamespaceFilter
(white, black []string)
collector/filter/oplog_filter.go:261
↓ 20 callers
Function
NewCheckpointManager
(name string, startPosition int64)
collector/ckpt/ckpt_manager.go:25
↓ 20 callers
Function
NewNamespaceTransform
(transRule []string)
collector/transform/transform.go:29
↓ 19 callers
Function
Hash
(hashObject interface{})
oplog/hasher.go:159
↓ 17 callers
Method
Close
()
common/community_client.go:173
↓ 17 callers
Method
Next
update query timestamp
collector/reader/reader.go:14
↓ 16 callers
Method
DistributeOplogByMod
(log *PartialLog, mod int)
oplog/hasher.go:21
↓ 16 callers
Function
mockDeleteOplogRecord
(oId interface{})
executor/db_writer_test.go:31
↓ 16 callers
Function
parseLastTimestamp
(oplogs []*OplogRecord)
executor/db_writer.go:370
↓ 15 callers
Method
Inject
Inject inject data
collector/persister.go:135
↓ 15 callers
Method
Sync
** * Replay oplog entry with batched Oplog * */
tunnel/tunnel.go:218
↓ 15 callers
Method
doUpdateOnInsert
update when insert duplicated
executor/db_writer.go:29
↓ 14 callers
Method
Filter
(log *oplog.PartialLog)
collector/filter/oplog_filter.go:50
↓ 14 callers
Function
IgnoreError
IgnoreError return true if error can be ignored https://github.com/mongodb/mongo/blob/master/src/mongo/base/error_codes.yml
executor/db_writer.go:326
↓ 14 callers
Function
RemoveFiled
RemoveFiled remove specified field in bson.D and return the one after modify
oplog/oplog.go:216
↓ 14 callers
Function
transformLogs
if no need to transform namespace, return original logs for no command log, transform namespace in DBRef by conf.Options.TransformDBRef for command lo
executor/executor.go:267
↓ 13 callers
Method
Fatal
(args ...any)
pkg/log/logger.go:257
↓ 13 callers
Function
RunCommand
(database, operation string, log *oplog.PartialLog, client *mongo.Client)
executor/db_writer.go:65
↓ 13 callers
Function
log_info
(message)
scripts/comparison_3x.py:22
↓ 12 callers
Function
BlockMongoUrlPassword
BlockMongoUrlPassword block password in two kinds of mongo_urls: 1) "mongodb://username:password@address" 2) "username:password@address"
common/common.go:112
↓ 12 callers
Method
Close
()
common/speed.go:92
↓ 12 callers
Function
GetAndCompareVersion
GetAndCompareVersion get current db version and compare to threshold. Return whether the result is bigger or equal to the input threshold.
common/db_opertion.go:68
↓ 12 callers
Function
NewMongoCommunityConn
(url string, connectMode string, timeout bool, readConcern, writeConcern string, sslRootFile string)
common/community_client.go:78
↓ 12 callers
Function
NewOpTypeFilter
NewOpTypeFilter trusts sanitize to provide normalized op type values.
collector/filter/oplog_filter.go:37
↓ 12 callers
Method
split
split oplogs into safety segments
executor/collision_matrix.go:30
↓ 11 callers
Method
Close
()
tunnel/kafka/sync_writer.go:67
↓ 11 callers
Method
Done
()
tunnel/kafka/saram_client.go:35
↓ 11 callers
Method
calculateWorkerLowestCheckpoint
()
collector/checkpoint.go:148
↓ 11 callers
Function
log_info
(message)
tools/data_generator.py:21
↓ 10 callers
Method
Close
()
pkg/log/logger.go:287
↓ 10 callers
Function
ExtraCommandName
(o bson.D)
oplog/cmd_oplog.go:37
↓ 10 callers
Function
New
(logLevel, logDir, logFile string, logFlush bool, maxSizeMB, maxAge, verbose int)
pkg/log/logger.go:43
↓ 10 callers
Function
NormalizeApplyOps
NormalizeApplyOps extracts and normalizes applyOps into []bson.D so callers can share one BSON-container compatibility path while keeping their own ap
oplog/apply_ops.go:13
↓ 10 callers
Function
SetFiled
(input bson.D, key string, value interface{})
oplog/oplog.go:241
↓ 10 callers
Method
Wait
()
collector/docsyncer/doc_executor.go:105
↓ 10 callers
Function
calculateTop3
(inputMap sync.Map)
executor/executor.go:446
↓ 10 callers
Function
getAllDoc
(db, coll string)
oplog/change_stream_event_test.go:404
↓ 10 callers
Method
getBatchWithDelay
* * if delay > 0, this function wait till delay timeout. * However, if the mergeBatch contain may oplogs, the delay time will depend on the first *
collector/batcher.go:207
↓ 10 callers
Function
log_info
(message)
scripts/comparison.py:21
↓ 10 callers
Function
mockCheckpointSyncer
(workerNum int)
collector/checkpoint_test.go:10
↓ 9 callers
Function
log_error
(message)
scripts/comparison_3x.py:25
↓ 9 callers
Function
log_error
(message)
scripts/comparison.py:24
↓ 9 callers
Function
mockLog
mock oplog with different namespace
collector/syncer_test.go:19
↓ 9 callers
Function
mockOplogsBinary
()
collector/persister_test.go:14
↓ 9 callers
Function
newMongoClient
newMongoClient only used in unit test
oplog/change_stream_event_test.go:80
↓ 8 callers
Function
ConvertBsonD2M
ConvertBsonD2M convert bson.D to bson.M
oplog/oplog.go:173
↓ 8 callers
Method
GetInMemory
GetInMemory return in-memory checkpoint
collector/ckpt/ckpt_manager.go:79
↓ 8 callers
Function
Int64ToTimestamp
(t int64)
common/mix.go:38
↓ 8 callers
Method
IsTxn
IsTxn is true if the oplog entry is part of any transaction, i.e. the lsid field exists.
oplog/txn_meta.go:132
↓ 8 callers
Method
addOperationMetric
(op string, count uint64)
executor/operation.go:155
↓ 8 callers
Method
mergeToGroups
(logs []*OplogRecord)
executor/combiner.go:27
↓ 7 callers
Function
DiffUpdateOplogToNormal
DiffUpdateOplogToNormal convert diff update oplog(v2) to normal one(v1) * Oplog from mongod(5.0) in sharding&replica》 Example 1: { "ts": {"T": 165
oplog/oplog.go:351
↓ 7 callers
Function
ExtractMongoTimestamp
(ts interface{})
common/mix.go:51
↓ 7 callers
Method
Get
Get read checkpoint from remote storage. and encapsulation with CheckpointContext struct bool means whether exists on remote
collector/ckpt/ckpt_operation.go:49
↓ 7 callers
Function
NewTxnMeta
NewTxnMeta extracts transaction metadata from an oplog entry. A non-transaction will return a zero-value TxnMeta struct, not an error. Currently the
oplog/txn_meta.go:50
↓ 7 callers
Method
Run
()
collector/coordinator/extra_job.go:26
↓ 7 callers
Method
Str
()
common/session.go:22
↓ 7 callers
Method
addNsMapMetric
(ns, op string, count int)
executor/operation.go:191
↓ 7 callers
Function
crash
(msg string, errCode int)
cmd/collector/collector.go:229
↓ 7 callers
Method
doDelete
delete operation
executor/db_writer.go:35
↓ 7 callers
Method
get
internal get next oplog. Used in Next() and NextOplog(). The channel and current function may both return timeout which is acceptable.
collector/reader/oplog_reader.go:125
↓ 7 callers
Function
hasOriginalSpec
hasOriginalSpec checks if a commitIndexBuild/createIndexes oplog contains originalSpec in any of its indexes. Time-series collection indexes have orig
executor/db_writer.go:381
↓ 6 callers
Method
Create
create specific Tunnel with tunnel name and pass connection or usefully meta
tunnel/tunnel.go:159
↓ 6 callers
Method
DistributeOplogByMod
(log *PartialLog, mod int)
oplog/hasher.go:100
↓ 6 callers
Method
Dump
Dump will dump oplog according to the given keys, "all" == true means ignore keys
oplog/oplog.go:110
↓ 6 callers
Method
Filter
(log *oplog.PartialLog)
collector/filter/oplog_filter.go:159
next →
1–100 of 933, ranked by callers