用于CAS
| 56 | |
| 57 | // 用于CAS |
| 58 | type 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中接收到的命令转化成数据库中的值 |
nothing calls this directly
no outgoing calls
no test coverage detected