Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/1345414527/MIT6.824-2022
/ functions
Functions
474 in github.com/1345414527/MIT6.824-2022
⨍
Functions
474
◇
Types & classes
105
↓ 59 callers
Method
one
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 callers
Method
join
tell the shardctrler that a group is joining.
shardkv/config.go:306
↓ 41 callers
Method
connect
attach server i to the net.
raft/config.go:365
↓ 38 callers
Method
disconnect
detach server i from the net.
raft/config.go:388
↓ 37 callers
Method
Enable
enable/disable a ClientEnd.
labrpc/labrpc.go:360
↓ 34 callers
Function
check
(t *testing.T, ck *Clerk, key string, value string)
shardkv/test_test.go:18
↓ 32 callers
Method
checkOneLeader
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 callers
Function
randstring
(n int)
shardkv/config.go:20
↓ 31 callers
Method
Call
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 callers
Method
Query
(num int)
shardctrler/client.go:33
↓ 26 callers
Method
Decode
(e interface{})
labgob/labgob.go:52
↓ 26 callers
Method
leave
tell the shardctrler that a group is leaving.
shardkv/config.go:324
↓ 26 callers
Method
log
(format string, value ...interface{})
shardkv/server.go:80
↓ 25 callers
Method
Encode
(e interface{})
labgob/labgob.go:32
↓ 24 callers
Method
Start
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 callers
Method
Connect
connect a ClientEnd to a server. a ClientEnd can only be connected once in its lifetime.
labrpc/labrpc.go:352
↓ 23 callers
Function
DPrintf
debug下打印日志
kvraft/util.go:26
↓ 23 callers
Method
MakeEnd
create a client end-point. start the thread that listens and delivers.
labrpc/labrpc.go:317
↓ 23 callers
Method
begin
start a Test. print the Test message. e.g. cfg.begin("Test (2B): RPC counts aren't too high")
raft/config.go:630
↓ 22 callers
Function
DPrintf
debug下打印日志
mr/common.go:26
↓ 22 callers
Function
DPrintf
debug下打印日志
raft/util.go:25
↓ 22 callers
Method
cleanup
()
raft/config.go:353
↓ 22 callers
Method
end
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 callers
Function
make_config
(t *testing.T, n int, unreliable bool, snapshot bool)
raft/config.go:65
↓ 20 callers
Method
AddService
(svc *Service)
labrpc/labrpc.go:403
↓ 20 callers
Function
MakeService
(rcvr interface{})
labrpc/labrpc.go:451
↓ 19 callers
Method
makeClient
()
shardkv/config.go:118
↓ 19 callers
Method
unlock
(msg string)
shardkv/server.go:70
↓ 17 callers
Function
GenericTest
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 callers
Method
Join
(servers map[int][]string)
shardctrler/client.go:52
↓ 17 callers
Method
Put
(key string, value string)
shardkv/client.go:141
↓ 16 callers
Method
AddServer
(servername interface{}, rs *Server)
labrpc/labrpc.go:336
↓ 16 callers
Function
MakeServer
()
labrpc/labrpc.go:397
↓ 16 callers
Method
ShutdownGroup
(gi int)
shardkv/config.go:197
↓ 16 callers
Method
start1
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 callers
Method
Cleanup
()
labrpc/labrpc.go:170
↓ 15 callers
Function
MakeNetwork
()
labrpc/labrpc.go:143
↓ 15 callers
Function
Put
(cfg *config, ck *Clerk, key string, value string, log *OpLog, cli int)
kvraft/test_test.go:67
↓ 15 callers
Function
Register
(value interface{})
labgob/labgob.go:58
↓ 15 callers
Method
lock
* 通用函数 */ 自定义锁
shardkv/server.go:64
↓ 14 callers
Method
Append
(key string, value string)
shardkv/client.go:144
↓ 14 callers
Function
check
(cfg *config, t *testing.T, ck *Clerk, key string, value string)
kvraft/test_test.go:99
↓ 13 callers
Method
cleanup
()
shardkv/config.go:79
↓ 13 callers
Function
make_config
(t *testing.T, n int, unreliable bool, maxraftstate int)
shardkv/config.go:338
↓ 12 callers
Function
DPrintf
debug下打印日志
shardctrler/util.go:26
↓ 12 callers
Method
GetState
return currentTerm and whether this server believes it is the leader.
raft/raft.go:118
↓ 12 callers
Method
StartGroup
(gi int)
shardkv/config.go:264
↓ 12 callers
Method
getLastLogTermAndIndex
返回当前状态机的最后一条日志的任期和索引 索引是一直会增大的,但是我们的日志队列却不可能无限增大,在队列中下标0存储快照
raft/raft.go:139
↓ 12 callers
Method
makeClient
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 callers
Method
All
()
kvraft/config.go:157
↓ 11 callers
Method
Leave
(gids []int)
shardctrler/client.go:72
↓ 10 callers
Function
check
import "time"
shardctrler/test_test.go:12
↓ 10 callers
Method
persist
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 callers
Function
NewDecoder
(r io.Reader)
labgob/labgob.go:46
↓ 9 callers
Function
NewEncoder
(w io.Writer)
labgob/labgob.go:26
↓ 9 callers
Method
changeRole
(newRole Role)
raft/raft.go:143
↓ 9 callers
Method
resetElectionTimer
()
raft/raft.go:132
↓ 8 callers
Method
StartServer
start i'th server in gi'th group
shardkv/config.go:204
↓ 8 callers
Method
begin
start a Test. print the Test message. e.g. cfg.begin("Test (2B): RPC counts aren't too high")
kvraft/config.go:399
↓ 8 callers
Method
end
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 callers
Method
nCommitted
how many servers think a log entry is committed?
raft/config.go:505
↓ 8 callers
Method
reportTask
rpc请求:报告任务状态
mr/worker.go:230
↓ 7 callers
Method
RaftStateSize
()
raft/persister.go:51
↓ 7 callers
Method
ReadSnapshot
()
raft/persister.go:66
↓ 7 callers
Method
Reliable
(yes bool)
labrpc/labrpc.go:174
↓ 7 callers
Method
ShutdownServer
Shutdown i'th server of gi'th group, by isolating it
shardkv/config.go:156
↓ 7 callers
Method
StartServer
If restart servers, first call ShutdownServer
kvraft/config.go:287
↓ 7 callers
Method
crash1
shut down a Raft server but save its persistent state.
raft/config.go:110
↓ 6 callers
Method
All
()
shardctrler/config.go:130
↓ 6 callers
Method
GetCount
()
labrpc/labrpc.go:436
↓ 6 callers
Function
MakePersister
()
raft/persister.go:20
↓ 6 callers
Method
cleanup
()
kvraft/config.go:69
↓ 6 callers
Method
getStoreIndexByLogIndex
获取当前存储位置的索引
raft/raft_append_entries.go:53
↓ 6 callers
Function
key2shard
which shard is a key in? please use this function, and please do not change it.
shardkv/client.go:24
↓ 6 callers
Function
make_config
(t *testing.T, n int, unreliable bool, maxraftstate int)
kvraft/config.go:360
↓ 6 callers
Function
nrand
()
shardctrler/client.go:18
↓ 6 callers
Method
unlock
(msg string)
kvraft/server.go:65
↓ 5 callers
Method
Append
(op porcupine.Operation)
kvraft/test_test.go:28
↓ 5 callers
Method
Copy
()
shardkv/common.go:104
↓ 5 callers
Method
DeleteServer
(servername interface{})
labrpc/labrpc.go:343
↓ 5 callers
Method
Done
main/mrcoordinator.go calls Done() periodically to find out if the entire job has finished. 如果工作全部完成,返回true
mr/coordinator.go:232
↓ 5 callers
Function
Get
get/put/putappend that keep counts
kvraft/test_test.go:49
↓ 5 callers
Method
Kill
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 callers
Method
Read
()
kvraft/test_test.go:34
↓ 5 callers
Function
checkValue
(value interface{})
labgob/labgob.go:68
↓ 5 callers
Function
clone
(orig []byte)
raft/persister.go:24
↓ 5 callers
Method
ctrlername
controler server name for labrpc.
shardkv/config.go:108
↓ 5 callers
Method
getConfigByIndex
(idx int)
shardctrler/server.go:85
↓ 5 callers
Method
killed
()
raft/raft.go:369
↓ 5 callers
Function
nrand
用于生成一个随机数,可以生成clientId和commandId
kvraft/client.go:24
↓ 5 callers
Method
partition
Sets up 2 partitions with connectivity between servers in each partition.
kvraft/config.go:174
↓ 5 callers
Method
saveSnapshot
保存快照
shardkv/server_snapshot.go:11
↓ 5 callers
Function
snapcommon
(t *testing.T, name string, disconnect bool, reliable bool, crash bool)
raft/test_test.go:1118
↓ 5 callers
Method
unlock
(msg string)
shardctrler/server.go:57
↓ 4 callers
Method
ConnectAll
()
kvraft/config.go:165
↓ 4 callers
Method
Copy
()
shardctrler/common.go:106
↓ 4 callers
Method
Copy
()
raft/persister.go:30
↓ 4 callers
Function
DPrintf
debug下打印日志
shardkv/util.go:26
↓ 4 callers
Method
Get
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 callers
Function
Make
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