MCPcopy Create free account

hub / github.com/1345414527/MIT6.824-2022 / functions

Functions474 in github.com/1345414527/MIT6.824-2022

↓ 59 callersMethodone
do a complete agreement. it might choose the wrong leader initially, and have to re-submit after giving up. entirely gives up after about 10 seconds.
raft/config.go:575
↓ 49 callersMethodjoin
tell the shardctrler that a group is joining.
shardkv/config.go:306
↓ 41 callersMethodconnect
attach server i to the net.
raft/config.go:365
↓ 38 callersMethoddisconnect
detach server i from the net.
raft/config.go:388
↓ 37 callersMethodEnable
enable/disable a ClientEnd.
labrpc/labrpc.go:360
↓ 34 callersFunctioncheck
(t *testing.T, ck *Clerk, key string, value string)
shardkv/test_test.go:18
↓ 32 callersMethodcheckOneLeader
check that one of the connected servers thinks it is the leader, and that no other connected server thinks otherwise. try a few times in case re-ele
raft/config.go:439
↓ 32 callersFunctionrandstring
(n int)
shardkv/config.go:20
↓ 31 callersMethodCall
send an RPC, wait for the reply. the return value indicates success; false means that no reply was received from the server. 请求使用的是每个客户端的chan,req会创建一个
labrpc/labrpc.go:87
↓ 31 callersMethodQuery
(num int)
shardctrler/client.go:33
↓ 26 callersMethodDecode
(e interface{})
labgob/labgob.go:52
↓ 26 callersMethodleave
tell the shardctrler that a group is leaving.
shardkv/config.go:324
↓ 26 callersMethodlog
(format string, value ...interface{})
shardkv/server.go:80
↓ 25 callersMethodEncode
(e interface{})
labgob/labgob.go:32
↓ 24 callersMethodStart
the service using Raft (e.g. a k/v server) wants to start agreement on the next command to be appended to Raft's log. if this server isn't the leader
raft/raft.go:322
↓ 23 callersMethodConnect
connect a ClientEnd to a server. a ClientEnd can only be connected once in its lifetime.
labrpc/labrpc.go:352
↓ 23 callersFunctionDPrintf
debug下打印日志
kvraft/util.go:26
↓ 23 callersMethodMakeEnd
create a client end-point. start the thread that listens and delivers.
labrpc/labrpc.go:317
↓ 23 callersMethodbegin
start a Test. print the Test message. e.g. cfg.begin("Test (2B): RPC counts aren't too high")
raft/config.go:630
↓ 22 callersFunctionDPrintf
debug下打印日志
mr/common.go:26
↓ 22 callersFunctionDPrintf
debug下打印日志
raft/util.go:25
↓ 22 callersMethodcleanup
()
raft/config.go:353
↓ 22 callersMethodend
end a Test -- the fact that we got here means there was no failure. print the Passed message, and some performance numbers.
raft/config.go:643
↓ 22 callersFunctionmake_config
(t *testing.T, n int, unreliable bool, snapshot bool)
raft/config.go:65
↓ 20 callersMethodAddService
(svc *Service)
labrpc/labrpc.go:403
↓ 20 callersFunctionMakeService
(rcvr interface{})
labrpc/labrpc.go:451
↓ 19 callersMethodmakeClient
()
shardkv/config.go:118
↓ 19 callersMethodunlock
(msg string)
shardkv/server.go:70
↓ 17 callersFunctionGenericTest
Basic test is as follows: one or more clients submitting Append/Get operations to set of servers for some period of time. After the period is over, t
kvraft/test_test.go:214
↓ 17 callersMethodJoin
(servers map[int][]string)
shardctrler/client.go:52
↓ 17 callersMethodPut
(key string, value string)
shardkv/client.go:141
↓ 16 callersMethodAddServer
(servername interface{}, rs *Server)
labrpc/labrpc.go:336
↓ 16 callersFunctionMakeServer
()
labrpc/labrpc.go:397
↓ 16 callersMethodShutdownGroup
(gi int)
shardkv/config.go:197
↓ 16 callersMethodstart1
start or re-start a Raft. if one already exists, "kill" it first. allocate new outgoing port file names, and a new state persister, to isolate previo
raft/config.go:281
↓ 15 callersMethodCleanup
()
labrpc/labrpc.go:170
↓ 15 callersFunctionMakeNetwork
()
labrpc/labrpc.go:143
↓ 15 callersFunctionPut
(cfg *config, ck *Clerk, key string, value string, log *OpLog, cli int)
kvraft/test_test.go:67
↓ 15 callersFunctionRegister
(value interface{})
labgob/labgob.go:58
↓ 15 callersMethodlock
* 通用函数 */ 自定义锁
shardkv/server.go:64
↓ 14 callersMethodAppend
(key string, value string)
shardkv/client.go:144
↓ 14 callersFunctioncheck
(cfg *config, t *testing.T, ck *Clerk, key string, value string)
kvraft/test_test.go:99
↓ 13 callersMethodcleanup
()
shardkv/config.go:79
↓ 13 callersFunctionmake_config
(t *testing.T, n int, unreliable bool, maxraftstate int)
shardkv/config.go:338
↓ 12 callersFunctionDPrintf
debug下打印日志
shardctrler/util.go:26
↓ 12 callersMethodGetState
return currentTerm and whether this server believes it is the leader.
raft/raft.go:118
↓ 12 callersMethodStartGroup
(gi int)
shardkv/config.go:264
↓ 12 callersMethodgetLastLogTermAndIndex
返回当前状态机的最后一条日志的任期和索引 索引是一直会增大的,但是我们的日志队列却不可能无限增大,在队列中下标0存储快照
raft/raft.go:139
↓ 12 callersMethodmakeClient
Create a clerk with clerk specific server names. Give it connections to all of the servers, but for now enable only connections to servers in to[].
kvraft/config.go:191
↓ 11 callersMethodAll
()
kvraft/config.go:157
↓ 11 callersMethodLeave
(gids []int)
shardctrler/client.go:72
↓ 10 callersFunctioncheck
import "time"
shardctrler/test_test.go:12
↓ 10 callersMethodpersist
save Raft's persistent state to stable storage, where it can later be retrieved after a crash and restart. see paper's Figure 2 for a description of
raft/raft.go:188
↓ 9 callersFunctionNewDecoder
(r io.Reader)
labgob/labgob.go:46
↓ 9 callersFunctionNewEncoder
(w io.Writer)
labgob/labgob.go:26
↓ 9 callersMethodchangeRole
(newRole Role)
raft/raft.go:143
↓ 9 callersMethodresetElectionTimer
()
raft/raft.go:132
↓ 8 callersMethodStartServer
start i'th server in gi'th group
shardkv/config.go:204
↓ 8 callersMethodbegin
start a Test. print the Test message. e.g. cfg.begin("Test (2B): RPC counts aren't too high")
kvraft/config.go:399
↓ 8 callersMethodend
end a Test -- the fact that we got here means there was no failure. print the Passed message, and some performance numbers.
kvraft/config.go:414
↓ 8 callersMethodnCommitted
how many servers think a log entry is committed?
raft/config.go:505
↓ 8 callersMethodreportTask
rpc请求:报告任务状态
mr/worker.go:230
↓ 7 callersMethodRaftStateSize
()
raft/persister.go:51
↓ 7 callersMethodReadSnapshot
()
raft/persister.go:66
↓ 7 callersMethodReliable
(yes bool)
labrpc/labrpc.go:174
↓ 7 callersMethodShutdownServer
Shutdown i'th server of gi'th group, by isolating it
shardkv/config.go:156
↓ 7 callersMethodStartServer
If restart servers, first call ShutdownServer
kvraft/config.go:287
↓ 7 callersMethodcrash1
shut down a Raft server but save its persistent state.
raft/config.go:110
↓ 6 callersMethodAll
()
shardctrler/config.go:130
↓ 6 callersMethodGetCount
()
labrpc/labrpc.go:436
↓ 6 callersFunctionMakePersister
()
raft/persister.go:20
↓ 6 callersMethodcleanup
()
kvraft/config.go:69
↓ 6 callersMethodgetStoreIndexByLogIndex
获取当前存储位置的索引
raft/raft_append_entries.go:53
↓ 6 callersFunctionkey2shard
which shard is a key in? please use this function, and please do not change it.
shardkv/client.go:24
↓ 6 callersFunctionmake_config
(t *testing.T, n int, unreliable bool, maxraftstate int)
kvraft/config.go:360
↓ 6 callersFunctionnrand
()
shardctrler/client.go:18
↓ 6 callersMethodunlock
(msg string)
kvraft/server.go:65
↓ 5 callersMethodAppend
(op porcupine.Operation)
kvraft/test_test.go:28
↓ 5 callersMethodCopy
()
shardkv/common.go:104
↓ 5 callersMethodDeleteServer
(servername interface{})
labrpc/labrpc.go:343
↓ 5 callersMethodDone
main/mrcoordinator.go calls Done() periodically to find out if the entire job has finished. 如果工作全部完成,返回true
mr/coordinator.go:232
↓ 5 callersFunctionGet
get/put/putappend that keep counts
kvraft/test_test.go:49
↓ 5 callersMethodKill
the tester doesn't halt goroutines created by Raft after each test, but it does call the Kill() method. your code can use killed() to check whether K
raft/raft.go:364
↓ 5 callersMethodRead
()
kvraft/test_test.go:34
↓ 5 callersFunctioncheckValue
(value interface{})
labgob/labgob.go:68
↓ 5 callersFunctionclone
(orig []byte)
raft/persister.go:24
↓ 5 callersMethodctrlername
controler server name for labrpc.
shardkv/config.go:108
↓ 5 callersMethodgetConfigByIndex
(idx int)
shardctrler/server.go:85
↓ 5 callersMethodkilled
()
raft/raft.go:369
↓ 5 callersFunctionnrand
用于生成一个随机数,可以生成clientId和commandId
kvraft/client.go:24
↓ 5 callersMethodpartition
Sets up 2 partitions with connectivity between servers in each partition.
kvraft/config.go:174
↓ 5 callersMethodsaveSnapshot
保存快照
shardkv/server_snapshot.go:11
↓ 5 callersFunctionsnapcommon
(t *testing.T, name string, disconnect bool, reliable bool, crash bool)
raft/test_test.go:1118
↓ 5 callersMethodunlock
(msg string)
shardctrler/server.go:57
↓ 4 callersMethodConnectAll
()
kvraft/config.go:165
↓ 4 callersMethodCopy
()
shardctrler/common.go:106
↓ 4 callersMethodCopy
()
raft/persister.go:30
↓ 4 callersFunctionDPrintf
debug下打印日志
shardkv/util.go:26
↓ 4 callersMethodGet
fetch the current value for a key. returns "" if the key does not exist. keeps trying forever in the face of all other errors. you can send an RPC w
kvraft/client.go:53
↓ 4 callersFunctionMake
the service or tester wants to create a Raft server. the ports of all the Raft servers (including this one) are in peers[]. this server's port is pee
raft/raft.go:472
next →1–100 of 474, ranked by callers