MCPcopy Create free account
hub / github.com/Super-long/ChubbyGo / CASOp

Struct CASOp

BaseServer/processdaemon.go:58–67  ·  view source on GitHub ↗

用于CAS

Source from the content-addressed store, hash-verified

56
57// 用于CAS
58type CASOp struct{
59 ClientID uint64 // 每个Client的ID
60 Clientseq int // 这个ClientID上目前的操作数
61
62 Key string
63 Old string // 思前想去old,new这里还是搞成string比较好,省的在守护线程里面再转换一次,减少临界区的开销
64 New string
65 boundary int // 当在CAS比较失败的时候进行边界对比,如果还可以容纳一个interval,进行操作。
66 Interval int
67}
68
69/*
70 * @brief: 为了从raft接收数据,负责把从applyCh中接收到的命令转化成数据库中的值

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected