文章目录

    • 一致性
      • 一致性算法的特性
    • Raft状态和状态的转化
      • Raft定义
      • Raft状态的转化过程
      • Raft实例初始化
    • Raft的一些规则
    • Leader Election
      • Candidate选举过程与相应处理
      • Receiver投票策略
    • Log Replication
      • Leader 复制log请求与响应
      • Receiver对AppendEntries的处理
      • 复制日志的优化
      • 状态持久化

一致性

分布式系统最核心问题:维持多个节点副本的一致性。一致性协议通常基于replicated state machines,即所有结点都从同一个state出发,都经过同样的一些操作序列(log),最后到达同样的state。
在这里插入图片描述

  • 状态机:当我们说一致性的时候,实际就是在说要保证这个状态机的一致性。状态机会从log里面取出所有的命令,然后执行一遍,得到的结果就是我们对外提供的保证了一致性的数据
  • Log: 保存了所有修改记录
  • 一致性模块: 一致性模块算法就是用来保证写入的log的命令的一致性,这也是raft算法核心内容

一致性算法的特性

  • safety: 在非拜占庭条件下不会返回不正确的结果(网络延迟、分区、丢包、重复、顺序重排)
  • available:前提大多数节点存活
  • do not depend on timing to ensure the consistency of the logs
  • a command can complete as soon as a majority of the cluster has responded to a single round of remote procedure calls

Raft状态和状态的转化

Raft采用问题分解法状态简化法对一致性算法进行了简化,每个Raft实例会在以下三种状态下进行转化:

  • Leader:所有请求的处理者,Leader副本接受client的更新请求,本地处理后再同步至多个其他副本;
  • Follower:请求的被动更新者,从Leader接受更新请求,然后写入本地日志文件
  • Candidate:如果Follower副本在一段时间内没有收到Leader副本的心跳,则判断Leader可能已经故障,此时启动选主过程,此时副本会变成Candidate状态,直到选主结束。

每种状态都可以用一个统一的Raft实例表示,用state属性来标识当前Raft所在的状态,按照论文中属性来定义Raft实例:
在这里插入图片描述

Raft定义

type Raft struct {mu        sync.Mutex          // Lock to protect shared access to this peer's statepeers     []*labrpc.ClientEnd // RPC end points of all peerspersister *Persister          // Object to hold this peer's persisted stateme        int                 // this peer's index into peers[]// Your data here (2A, 2B, 2C).// Look at the paper's Figure 2 for a description of what// state a Raft server must maintain.currentTerm    int         //2AvotedFor       int         //2AelectionTimer  *time.Timer //2AheartbeatTimer *time.Timer //2Astate          NodeState   //2Alogs         []LogEntry    //2BcommitIndex int           //2BlastApplied int           //2BnextIndex   []int         //2BmatchIndex  []int         //2BapplyCh     chan ApplyMsg //2B
}

Raft状态的转化过程

在这里插入图片描述
什么时候转化为Candidate

  • follower -> candidate: follower的选举超时时间(electionTimer)到
  • candidate -> candidate: candidate在选举时间内没有赢得选举并且也没有收到来自新leader的心跳

转化为candidate要开始进行选举。

什么时候转化为Leader

  • candiadte -> leader: candidate 在获得majority选票时转化为leader

转化为leader后:初始化nextIndex[], 停止选举超时定时器、向其他server发送心跳、发送完心跳后也要重置心跳定时器(heartbeatTimer)

什么时候转化为Follower

  • leader -> follower
  • candidate -> follower

无论对于leader还是candidate转化为follower的前提就是在RequestVoteRPC和AppendEntriesRPC的request或者response中的term 大于 currentTerm.
转化为follower后心跳定时器停止(对于原来是leader的情况)、重置选举定时器、投票值voteFor清空

根据上述介绍可以定义状态转化方法convertTo, 完成状态转化后的操作,并在相应的情况下进行convertTo的调用

func (rf *Raft) convertTo(state NodeState) {if rf.state == state {return}DPrintf("Term %d: server %d convert from %v to %v\n",rf.currentTerm, rf.me, rf.state, state)// update staterf.state = stateswitch state {case Follower:rf.heartbeatTimer.Stop() //if native server is leader, stop heartbeatrf.electionTimer.Reset(randomTime(ElectionTimeoutLower, ElectionTimeoutHigher))rf.votedFor = -1 //clear votedForcase Candidate:rf.startElection()case Leader:for i := range rf.nextIndex {rf.nextIndex[i] = len(rf.logs)}rf.electionTimer.Stop()rf.broadcastHeartbeat()rf.heartbeatTimer.Reset(HeartbeatInterval)}
}

两个定时器
选举定时器(electionTimer), 当出现以下四种情况需要重置定时器:

  • candidate或者leader转化为follower
  • candidate或者follower收到来自leader的心跳
  • candidate开始进行选举
  • 投票给除自身以外的candidate

心跳定时器(heartbeatTimer), 当leader发送完心跳后重置

Raft实例初始化

主要完成Raft实例属性的初始化,并kick off 一个 goroutine 来处理 timer 相关的事件,注意加锁。有几个点需要注意:

  • 所有的Raft实例都初始化为Follower
  • logs[]的index要从1开始rf.logs = make([]LogEntry, 1): logs 从第 1 个开始,这样第 0 个必然是所有节点都相同的。在发现log不一致时,nextIndex减一并在重试时不会越界。
  • nextIndex[]初始化为len(logs)
  • 采用select监听两个定时器,定时时间到完成相应的操作,并注意在读取state时加锁
func Make(peers []*labrpc.ClientEnd, me int,persister *Persister, applyCh chan ApplyMsg) *Raft {rf := &Raft{}rf.peers = peersrf.persister = persisterrf.me = me//2Arf.currentTerm = 0rf.votedFor = -1rf.electionTimer = time.NewTimer(randomTime(ElectionTimeoutLower, ElectionTimeoutHigher))rf.heartbeatTimer = time.NewTimer(HeartbeatInterval)rf.state = Follower//2Brf.applyCh = applyChrf.commitIndex = 0rf.lastApplied = 0rf.logs = make([]LogEntry, 1)rf.matchIndex = make([]int, len(rf.peers))rf.nextIndex = make([]int, len(rf.peers))for i := range rf.nextIndex {rf.nextIndex[i] = len(rf.logs)}//2c persist// initialize from state persisted before a crash//rf.readPersist(persister.ReadRaftState())rf.mu.Lock()rf.readPersist(persister.ReadRaftState())rf.mu.Unlock()go func(node *Raft) {for {select {case <-rf.electionTimer.C:rf.mu.Lock()if rf.state == Follower { //there are two situations: Follower and Candidaterf.convertTo(Candidate)} else {rf.startElection()}rf.mu.Unlock()case <-rf.heartbeatTimer.C:rf.mu.Lock()if rf.state == Leader {DPrintf("%v its log len is %d", rf, len(rf.logs))rf.broadcastHeartbeat()rf.heartbeatTimer.Reset(HeartbeatInterval)}rf.mu.Unlock()}}}(rf)return rf
}

Raft的一些规则

在这里插入图片描述

Leader Election

Leader Election 阶段需要保证safety和liveness:

  • safety: 每个term至多选出一个leader。主要由于:1、Raft保证一个term内同一个server只能投一票,并将voteFor持久化;2、另外要满足majority原则
    在这里插入图片描述
  • liveness: 参与竞选的候选人最终肯定会有一个成为leader。主要由于:1、election timeout 在[T, 2T]之间进行随机初始化,先超时的会赢得选举,从而克服网络分区;2、保证T >> broadcast time

Leader Election 过程可以将其细化为Candidate发送选举请求与处理请求和server投票两个部分
在这里插入图片描述

Candidate选举过程与相应处理

candidate需要完成以下操作:

  1. currentTerm 加一
  2. 重置选举定时器
  3. 给自己投票
  4. 并行发送RequestVoteRPC消息给其它所有server

收到RPC回复后可能出现三种结果:

  1. 自己被选成了leader。当收到了majority的投票后,状态切成Leader,并且定期给其它的所有server发心跳消息(不带log的AppendEntriesRPC)。
  2. 别人成为了leader。当Candidate在等待投票的过程中,收到了大于或者等于本地的currentTerm的声明对方是leader的AppendEntriesRPC时,则将自己的state切成follower,并且更新本地的currentTerm。
  3. 没有选出leader。当投票被瓜分,没有任何一个candidate收到了majority的vote时,没有leader被选出。这种情况下,每个candidate等待的投票的过程就超时了,接着candidates都会将本地的currentTerm再加1,进行新一轮的leader election。
func (rf *Raft) startElection() {defer rf.persist()rf.currentTerm += 1 // term+1rf.electionTimer.Reset(randomTime(ElectionTimeoutLower, ElectionTimeoutHigher))lastIndex := len(rf.logs) - 1args := RequestVoteArgs{Term:        rf.currentTerm,CandidateId: rf.me,LastLogIndex: lastIndex,LastLogTerm: rf.logs[lastIndex].Term,}var voteCount int32for i := range rf.peers {if i == rf.me {rf.votedFor = rf.meatomic.AddInt32(&voteCount, 1)continue}go func(server int) {var reply RequestVoteReplyif rf.sendRequestVote(server, &args, &reply) {rf.mu.Lock()DPrintf("%v: got RequestVote response from node %d, VoteGranted=%v, Term=%d",rf, server, reply.VoteGranted, reply.Term)if reply.VoteGranted && rf.state == Candidate { // term must >= currentTermatomic.AddInt32(&voteCount, 1)if atomic.LoadInt32(&voteCount) > int32(len(rf.peers)/2) {rf.convertTo(Leader)}} else {if reply.Term > rf.currentTerm {rf.currentTerm = reply.Termrf.convertTo(Follower)rf.persist()}}rf.mu.Unlock()} else {DPrintf("%v:send request vote to server %d failed", rf, server)}}(i)if rf.state == Leader {break}}
}

Receiver投票策略

Raft采用三个原则对投票进行约束:

  1. 每个server只能给同一个term的candidate投一票
  2. 投票顺序按照先来先服务的原则
  3. 为保证safety,candidate的log至少要和自己的log一样新(先比较两者的lastLogTerm, 谁的大谁更新;lastLogTerm一样时比较两者日志的长度,谁的更长谁更新)

投票成功后要重置选举定时器。

func (rf *Raft) RequestVote(args *RequestVoteArgs, reply *RequestVoteReply) {//lockrf.mu.Lock()defer rf.mu.Unlock()defer rf.persist()// Your code here (2A, 2B).// candidate term is smallerif args.Term < rf.currentTerm {reply.Term = rf.currentTermreply.VoteGranted = falsereturn}// 第一条和第二条:server has voted for other: only one vote for same term and FIFOif args.Term == rf.currentTerm && rf.votedFor != -1 && rf.votedFor != args.CandidateId {reply.Term = rf.currentTermreply.VoteGranted = falsereturn}// update current server: if the server is candidate or leader, it will be followerif args.Term > rf.currentTerm {rf.currentTerm = args.Termrf.convertTo(Follower)}//第三条:candidate log limitationlastLogIndex := len(rf.logs) - 1if args.LastLogTerm < rf.logs[lastLogIndex].Term ||(args.LastLogTerm == rf.logs[lastLogIndex].Term && args.LastLogIndex < lastLogIndex) {reply.Term = rf.currentTermreply.VoteGranted = falsereturn}rf.votedFor = args.CandidateIdreply.Term = rf.currentTerm // no usereply.VoteGranted = true// 重要:reset election timeout timerrf.electionTimer.Reset(randomTime(ElectionTimeoutLower, ElectionTimeoutHigher))
}

Log Replication

当Leader被选出来后,就可以接受客户端发来的请求了。leader会把它作为一个log entry append到日志中,然后给其它的server发AppendEntriesRPC请求。当Leader确定一个log entry被大多数replicated了,就apply这条log entry到状态机中然后返回结果给客户端。如果某个Follower宕机了或者运行的很慢,或者网络丢包了,则会一直给这个Follower发AppendEntriesRPC直到日志一致。

当一个新的Leader被选出来时,它的日志和其它的Follower的日志可能不一样,这个时候,就需要一个机制来保证日志的一致性。一个新leader产生时,集群状态可能如下:
在这里插入图片描述

为了使 Follower 的状态与 Leader 一致,Follower 需要找到它和 Leader 之间最后一个共同的 LogEntry, 将其后的所有 LogEntry 全部覆盖为 Leader 的。Leader 维护了所有节点的 nextIndex, 其含义是 Leader 需要与某个节点同步的第一个 LogEntry 的 index。 当一个 Leader 刚被选出的时候,它会把所有 nextIndex 初始化为自己的下一个 LogEntry index。 也就是说无需同步。这样如果有不一致的情况,Leader 发出的 AppendEntries RPC 会失败, Leader 会减少 nextIndex 然后重试,直到一致为止。 这个机制也解释了为什么我们的 logs 从第 1 个开始,这样第 0 个必然是所有节点都相同的。在重试时不会越界。

比如Figure7(b):
初始化,nextIndex为11,leader给b发送AppendEntriesRPC(6,10),b在自己log的10号槽位中没有找到term_id为6的log entry。则给leader回应一个拒绝消息。接着,leader将nextIndex减一,变成10,然后给b发送AppendEntriesRPC(6, 9),b在自己log的9号槽位中同样没有找到term_id为6的log entry。循环下去,直到leader发送了AppendEntriesRPC(4,4),b在自己log的槽位4中找到了term_id为4的log entry。接收了消息。随后,leader就可以从槽位5开始给b推送日志了。

日志的两种状态

  • committed(commitIndex参数)
    其含义是,该分布式系统 log 中已经达成一致的部分(LogEntry被复制到majority)
  • applied (lastApplied参数)
    已经committed的LogEntry可以被应用到状态机。

Leader 复制log请求与响应

在这里插入图片描述

func (rf *Raft) broadcastHeartbeat() {for i := range rf.peers {if i == rf.me {continue}go func(server int) {rf.mu.Lock()if rf.state != Leader {rf.mu.Unlock()return}preLogIndex := rf.nextIndex[server] - 1preLogTerm := rf.logs[preLogIndex].Term//1entries := make([]LogEntry, len(rf.logs[preLogIndex+1:]))copy(entries, rf.logs[preLogIndex+1:])args := AppendEntriesArgs{Term:     rf.currentTerm,LeaderId: rf.me,PreLogIndex: preLogIndex,PreLogTerm: preLogTerm,LogEntries: entries,LeaderCommit: rf.commitIndex,}rf.mu.Unlock()var reply AppendEntriesReplyif rf.sendAppendEntries(server, &args, &reply) {rf.mu.Lock()if rf.state != Leader {rf.mu.Unlock()return}if reply.Success {//2rf.matchIndex[server] = args.PreLogIndex + len(args.LogEntries)rf.nextIndex[server] = rf.matchIndex[server] + 1for i := len(rf.logs) - 1; i > rf.commitIndex; i-- {count := 0for _, index := range rf.matchIndex {if index >= i {count += 1}}if count > len(rf.peers) / 2 {//&& rf.currentTerm == rf.logs[i].Term{DPrintf("-----------%v commit %v", rf, rf.logs)rf.setCommitIndex(i)break}}//3} else {if reply.Term > rf.currentTerm {rf.currentTerm = reply.Termrf.convertTo(Follower)} else {rf.nextIndex[server] -= 1}}rf.mu.Unlock()}}(i)}
}

注意

  1. 向AppendEntries传递参数时,entries[]应该传递副本。因为可能出现这种情况:我们在对心跳包发送的 entries 进行 encoding 的时候,同时另一个地方正在对这些 entries 进行修改。比如:Leader 正在发送心跳包,Leader 由于某些原因转为了 Follower,log 被新的 Leader 改写。所以就会出现log被同时读写的情况。
  2. RPC请求成功说明log被复制到follower,需要更新matchIndex[]和nextIndex[]; 当复制到majority后更新leader的commitIndex: 即在log最后一个位置到commitIndex之间寻找N,满足多数的matchIndex[i] >= N,并且 log[N].term == currentTerm:设置commitIndex = N。只有leader的commitIndex的更新需要满足多数派,follower的commitIndex依靠leader的commitIndex更新。
  3. RPC请求失败有两种情况:一是RPC传回的term>currentTerm,此时需要更新currentTerm并转化为follower;二是follower和leader不满足Log Matching Rule, 此时需要更新nextIndex, 将当前的值减一。

apply log

更新完commitIndex后就可以将[lastApplied+1, commIndex]之间的log应用到状态机,并更新lastApplied。该操作可以单独创建新的goroutine处理。

func (rf *Raft) setCommitIndex(index int) {rf.commitIndex = indexDPrintf("%v commit index %d", rf, rf.commitIndex)if rf.commitIndex > rf.lastApplied {DPrintf("%v apply form index %d to %d", rf, rf.lastApplied+1, rf.commitIndex)applyLogs := append([]LogEntry{}, rf.logs[rf.lastApplied+1: rf.commitIndex+1]...)//new grountinego func(startIndex int, entries []LogEntry) {for i, entry := range entries {var msg ApplyMsgmsg.Command = entry.Commandmsg.CommandIndex = startIndex + imsg.CommandValid = truerf.applyCh <- msgrf.mu.Lock()if msg.CommandIndex > rf.lastApplied {rf.lastApplied = msg.CommandIndex}rf.mu.Unlock()}}(rf.lastApplied+1, applyLogs)}
}

Receiver对AppendEntries的处理

代码中的序号分别与AppendEntriesRPC中receiver implement对应

func (rf *Raft) AppendEntries(args *AppendEntriesArgs, reply *AppendEntriesReply) {rf.mu.Lock()defer rf.mu.Unlock()//DPrintf("------curFollower------%d----------", rf.me)//第一条:不满足最小规则返回falseif args.Term < rf.currentTerm {reply.Term = rf.currentTermreply.Success = falsereturn}if args.Term >= rf.currentTerm {rf.currentTerm = args.Termrf.convertTo(Follower)}//只要满足最小规则(说明收到了leader的心跳),无论日志复制成功与否,都需要重置选举定时器rf.electionTimer.Reset(randomTime(ElectionTimeoutLower, ElectionTimeoutHigher))//第二条:不满足Log Matching Rule,返回false. 包括两种情况:follower日志比args.PreLogIndex的短;args.PreLogIndex位置日志不一致curLastLogIndex := len(rf.logs) - 1if curLastLogIndex < args.PreLogIndex ||rf.logs[args.PreLogIndex].Term != args.PreLogTerm{reply.Term = rf.currentTermreply.Success = falsereturn}//第三条:follower日志比args.PreLogIndex长时,说明后面的log可能会存在冲突,寻找第一个冲突的位置,将后面的日志删除// find first position of unmached logentryunmachedIndex := -1for idx := range args.LogEntries {//DPrintf("args.logen*****%d*****%d", rf.me, len(args.LogEntries))if len(rf.logs) - 1 < args.PreLogIndex + 1 + idx ||rf.logs[args.PreLogIndex+1+idx].Term != args.LogEntries[idx].Term {unmachedIndex = idxbreak}}//copy log//第四条:删除冲突日志追加新日志if unmachedIndex != -1 {rf.logs = rf.logs[:args.PreLogIndex+1+unmachedIndex]rf.logs = append(rf.logs, args.LogEntries[unmachedIndex:]...)}//第五条:根据leader的commitIndex更新follower的commitIndex, 并进行applyif args.LeaderCommit > rf.commitIndex {if args.LeaderCommit <= len(rf.logs) - 1 {rf.setCommitIndex(args.LeaderCommit)} else {rf.setCommitIndex(len(rf.logs) - 1)}}reply.Success = true
}

复制日志的优化

优化之前每个 AppendEntries RPC 只能检查一个 index。做了之后可以检查一个 term。为 reply 增加两个信息。

type AppendEntriesReply struct {Term    int  // 2ASuccess bool // 2A// OPTIMIZE: see thesis section 5.3ConflictTerm  int // Follower 与 Leader 的不一致 log 的 termConflictIndex int // 不一致term的第一个index,下一次请求的 prevLogIndex = ConflictIndex - 1
}

follower处理RPC的逻辑
在这里插入图片描述

// entries before args.PrevLogIndex might be unmatch
// return false and ask Leader to decrement PrevLogIndex
if len(rf.logs) < args.PrevLogIndex + 1 {reply.Success = falsereply.Term = rf.currentTerm// optimistically thinks receiver's log matches with Leader's as a subsetreply.ConflictIndex = len(rf.logs)// no conflict termreply.ConflictTerm = -1return
}if rf.logs[args.PrevLogIndex].Term != args.PrevLogTerm {reply.Success = falsereply.Term = rf.currentTerm// receiver's log in certain term unmatches Leader's logreply.ConflictTerm = rf.logs[args.PrevLogIndex].Term// expecting Leader to check the former term// so set ConflictIndex to the first one of entries in ConflictTermconflictIndex := args.PrevLogIndex// apparently, since rf.logs[0] are ensured to match among all servers// ConflictIndex must be > 0, safe to minus 1for rf.logs[conflictIndex - 1].Term == reply.ConflictTerm {conflictIndex--}reply.ConflictIndex = ConflictIndexreturn
}

leader相应RPC逻辑
在这里插入图片描述

// log unmatch, update nextIndex[server] for the next trial
rf.nextIndex[server] = reply.ConflictIndex// if term found, override it to
// the first entry after entries in ConflictTerm
if reply.ConflictTerm != -1 {for i := args.PrevLogIndex; i >= 1; i-- {if rf.logs[i-1].Term == reply.ConflictTerm {// in next trial, check if log entries in ConflictTerm matchesrf.nextIndex[server] = ibreak}}
}

状态持久化

需要同步的三个变量:log, votedFor 和 currentTerm。

需要
向 Leader 添加一个新的需要同步的 LogEntry 时
Leader 处理 AppendEntries 的回复,并且需要改变自身 term 时
Candidate 处理 RequestVote 的回复,并且需要改变自身 term 时
Receiver 处理完 AppendEntries 或者 RequestVote 时
在这里插入图片描述
Raft特性与相关规则的对应关系

日志的两种状态
commitIndex的更新的时机

复制entry时的优化,,nextIndex

ppt 16 17 20 22 23

Q: Are there systems like Raft that can survive and continue to
operate when only a minority of the cluster is active?

A: Not with Raft’s properties. But you can do it with different
assumptions, or different client-visible semantics. The basic problem
is split-brain – the possibility of more than one server acting as
leader. There are two approaches that I know of.

If somehow clients and servers can learn exactly which servers are live
and which are dead (as opposed to live but partitioned by network
failure), then one can build a system that can function as long as one
is alive, picking (say) the lowest-numbered server known to be alive.
However, it’s hard for one computer to decide if another computer is
dead, as opposed to the network losing the messages between them. One
way to do it is to have a human decide – the human can inspect each
server and decide which are alive and dead.

The other approach is to allow split-brain operation, and to have a way
for servers to reconcile the resulting diverging state after partitions
are healed. This can be made to work for some kinds of services, but has
complex client-visible semantics (usually called “eventual
consistency”). Have a look at the Bayou and Dynamo papers which are
assigned later in the course.

Q: In Raft, the service which is being replicated is not available to
the clients during an election process. In practice how much of a
problem does this cause?

A: The client-visible pause seems likely to be on the order of a tenth of a
second. The authors expect failures (and thus elections) to be rare,
since they only happen if machines or the network fails. Many servers
and networks stay up continuously for months or even years at a time, so
this doesn’t seem like a huge problem for many applications.

Q: Are there other consensus systems that don’t have leader-election
pauses?

A: There are versions of Paxos-based replication that do not have a leader
or elections, and thus don’t suffer from pauses during elections.
Instead, any server can effectively act as leader at any time.

The paper mentions that Raft works under all non-Byzantine
conditions. What are Byzantine conditions and why could they make Raft
fail?
A: “Non-Byzantine conditions” means that the servers are fail-stop:
they either follow the Raft protocol correctly, or they halt. For
example, most power failures are non-Byzantine because they cause
computers to simply stop executing instructions; if a power failure
occurs, Raft may stop operating, but it won’t send incorrect results
to clients.

Byzantine failure refers to situations in which some computers execute
incorrectly, because of bugs or because someone malicious is
controlling the computers. If a failure like this occurs, Raft may
send incorrect results to clients.

Most of 6.824 is about tolerating non-Byzantine faults. Correct
operation despite Byzantine faults is more difficult; we’ll touch on
this topic at the end of the term.

Q: What if a client sends a request to a leader, the the leader
crashes before sending the client request to all followers, and the
new leader doesn’t have the request in its log? Won’t that cause the
client request to be lost?

A: Yes, the request may be lost. If a log entry isn’t committed, Raft
may not preserve it across a leader change.

That’s OK because the client could not have received a reply to its
request if Raft didn’t commit the request. The client will know (by
seeing a timeout or leader change) that its request wasn’t served, and
will re-send it.

The fact that clients can re-send requests means that the system has
to be on its guard against duplicate requests; you’ll deal with this
in Lab 3.

Q: If there’s a network partition, can Raft end up with two leaders
and split brain?

A: No. There can be at most one active leader.

A new leader can only be elected if it can contact a majority of servers
(including itself) with RequestVote RPCs. So if there’s a partition, and
one of the partitions contains a majority of the servers, that one
partition can elect a new leader. Other partitions must have only a
minority, so they cannot elect a leader. If there is no majority
partition, there will be no leader (until someone repairs the network
partition).

Q: Suppose a new leader is elected while the network is partitioned,
but the old leader is in a different partition. How will the old
leader know to stop committing new entries?

A: The old leader will either not be able to get a majority of
successful responses to its AppendEntries RPCs (if it’s in a minority
partition), or if it can talk to a majority, that majority must
overlap with the new leader’s majority, and the servers in the overlap
will tell the old leader that there’s a higher term. That will cause
the old leader to switch to follower.

Q: When some servers have failed, does “majority” refer to a majority
of the live servers, or a majority of all servers (even the dead
ones)?

A: Always a majority of all servers. So if there are 5 Raft peers in
total, but two have failed, a candidate must still get 3 votes
(including itself) in order to elected leader.

There are many reasons for this. It could be that the two “failed”
servers are actually up and running in a different partition. From
their point of view, there are three failed servers. If they were
allowed to elect a leader using just two votes (from just the two
live-looking servers), we would get split brain. Another reason is
that we need the majorities of any two leader to overlap at at least
one server, to guarantee that a new leader sees the previous term
number and any log entries committed in previous terms; this requires
a majority out of all servers, dead and alive.

Q: What if the election timeout is too short? Will that cause Raft to
malfunction?

A: A bad choice of election timeout does not affect safety, it only
affects liveness.

If the election timeout is too small, then followers may repeatedly
time out before the leader has a chance to send out any AppendEntries.
In that case Raft may spend all its time electing new leaders, and no
time processing client requests. If the election timeout is too large,
then there will be a needlessly large pause after a leader failure
before a new leader is elected.

Q: Can a candidate declare itself the leader as soon as it receives
votes from a majority, and not bother waiting for further RequestVote
replies?

A: Yes – a majority is sufficient. It would be a mistake to wait
longer, because some peers might have failed and thus not ever reply.

Q: Can a leader in Raft ever stop being a leader except by crashing?

A: Yes. If a leader’s CPU is slow, or its network connection breaks,
or loses too many packets, or delivers packets too slowly, the other
servers won’t see its AppendEntries RPCs, and will start an election.

查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 企业—Docker镜像的优化

    1.用普通方法将nginx镜像加入到容器中,先不做优化docker ps -a ##查看所有容器列表cd docker ##进入docker目录 vim Dockerfile ##编辑文件vim Dockerfile ##编辑此文件2.通过清理缓存和清除编译后的目录来实现镜像优化(优化第一步)vim Dockerfile ##编辑此文件3.通过减…...

    2024/5/10 10:26:28
  2. 滤波器分析

    【任务一:调试代码】 N=41; w=0.43; [h0,h1,g0,g1]=firpr2chfb(N,w); [H1z,w]=freqz(h0,1,512); H1_abs=abs(H1z);H1_db=20*log10(H1_abs); [H2z,w]=freqz(h1,1,512); H2_abs=abs(H2z);H2_db=20*log10(H2_abs); %%%%%%%%%%滤波器h0和h1的幅度响应%%%%%%%%%% figure(1); plot(…...

    2024/5/8 18:21:11
  3. Docker入门--容器数据卷(五)

    什么是容器数据卷? 容器之间可以使用一个数据共享技术!Docker 容器中产生的数据,同步到本地!本地的数据同样也可以同步到Docker容器内!容器之间也可以数据共享。这就是卷技术! 目录的挂载,将我们容器的目录,挂载到Linux上面。 类似数据库的数据和应用是分开的,那么这个…...

    2024/4/24 9:24:16
  4. leetcode 巧妙解法 面试题 05.02. 二进制数转字符串

    二进制数转字符串。给定一个介于0和1之间的实数(如0.72),类型为double,打印它的二进制表达式。如果该数字不在0和1之间,或者无法精确地用32位以内的二进制表示,则打印“ERROR”。 示例1: 输入:0.625 输出:“0.101” 示例2: 输入:0.1 输出:“ERROR” 提示:0.1无法被二…...

    2024/4/24 9:24:15
  5. 程序员考研

    谈谈我为什么明明知道考研很难,但却为什么还是选择考研。去年二月份还在准备着出去实习,忙着修改简历,到三月份的时候看着疫情结束遥遥无期,家长一直在催促我考研,在多方面的因素下就选择了考研,选择了考研有很多原因,也可能是我自欺欺人的借口。1. 今年黑天鹅事件,人算…...

    2024/5/8 2:17:45
  6. 计算机网络:网络分层

    参考来源:菜鸟教程 | TCP/IP 网际互联及OSI七层模型 物理层、数据链路层、网络层、传输层、会话层、表示层、应用层物理层作用:定义一些电器,机械,过程和规范,如集线器;PDU(协议数据单元):bit/比特设备:集线器HUB;注意:没有寻址的概念;数据链路层作用:定义如何格式化…...

    2024/5/10 9:30:26
  7. STM32 之十二 FLASH 使用详解 及 LL 库 FLASH 驱动实现

    最新项目中需要使用 STM32L476 的片子。在选择片子时,资源的多少成为了一个比较重要的考量。在斟酌一番之后,我决定采用 LL 库来实现本次的功能。但是在使用 LL 库的时候发现其中并没有处理 FLASH 的驱动 stm32l4xx_ll_flash.h 和 stm32l4xx_ll_flash.c。同样去其他系列芯片中…...

    2024/4/24 9:24:12
  8. Springboot实现短信验证登录

    一、介绍使用短信验证登录也是现在实际项目中普遍使用的一种登录,二、实际的操作流程1.用户在前端页面输入手机号码之后,点击发送验证码2.前端将手机号传给后端3.后端生成一个6为的随机数通过短信发送给用户,之后将手机号设为key,验证码设为value存入redis缓存中,最后将短…...

    2024/4/27 11:44:26
  9. 随机算法求pi、线性同余法求random、拉斯维加斯算法python

    一、随机算法求pi# 计算圆周率 import pdb import random def CalcPai(n):# 计算π值k = 0for i in range(0,n):x = random.random()y = random.random()if x**2 + y**2 <= 1:k = k +1print(format(4 * k / n, .2f)) if __name__ == __main__:print(请输入n:)n = input()n …...

    2024/4/24 9:24:16
  10. 华为:智能时代IP网络如何打造?需具备三大特征

    进入5G和云时代,实时在线、云上生活成为一种常态,网络的价值随着人们依赖度的不断加深而得到了前所未有的放大。与此同时,各种数字技术的交融、应用所带来的种种变革,也对网络本身的能力提出了更高诉求与新的挑战。2019年,华为吹响IP网络智能化的号角,通过引入大数据、AI…...

    2024/4/24 9:24:10
  11. SpringBoot整合Servlet、Filter、Listener、访问静态资源、文件上传

    1、Springboot整合Servlet,分为两种方式,分别如下所示:首先说明一下,这里使用的是Springboot2.2.6.RELEASE版本,由于Springboot迭代很快,所以要注意版本问题。1 <?xml version="1.0" encoding="UTF-8"?>2 <project xmlns="http://ma…...

    2024/4/24 9:24:08
  12. Java运算符之位运算运算符并举例说明

    运算符分类:算术运算符 赋值运算符 比较运算符 逻辑运算符 位运运算符 三目运算符位运算运算符注意:要做位运算,首先要把数据转换为二进制(使用的是补码)位运算符:&(有0则0) , | (有1则1) ,^(相同则0,不同则1) , ~(0变1,1变0) ,<<(左移) , >>(右移) …...

    2024/4/16 11:21:35
  13. 【Python】【难度:简单】Leetcode 5408. 通过翻转子数组使两个数组相等

    给你两个长度相同的整数数组 target 和 arr 。每一步中,你可以选择 arr 的任意 非空子数组 并将它翻转。你可以执行此过程任意次。如果你能让 arr 变得与 target 相同,返回 True;否则,返回 False 。示例 1:输入:target = [1,2,3,4], arr = [2,4,1,3] 输出:true 解释:你…...

    2024/4/16 11:22:21
  14. leetcode解题之柱状图中最大的矩形

    给定 n 个非负整数,用来表示柱状图中各个柱子的高度。每个柱子彼此相邻,且宽度为 1 。 求在该柱状图中,能够勾勒出来的矩形的最大面积。以上是柱状图的示例,其中每个柱子的宽度为 1,给定的高度为 [2,1,5,6,2,3]。图中阴影部分为所能勾勒出的最大矩形面积,其面积为 10 个单…...

    2024/4/15 6:15:07
  15. 微信小程序模板template的使用及传递集合数据

    模板template的使用 页面结构是完全一样的,适合使用模板来完成页面搭建,就不用写那些重复的代码了,而且修改界面的时候,也只需要稍微改动模板 一、定义模板 1、新建一个template文件夹用来管理项目中所有的模板; 2、新建一个person.wxml文件来定义模板; 3、使用name属性,…...

    2024/4/16 11:22:11
  16. 图形图像

    图形学...

    2024/4/24 9:24:07
  17. Zookeeper 理论总结

    目录zk的数据模型zk server的集群模式zk的工作原理leader的选举机制zk server如何处理zk client的请求?zk的特点zk的心跳机制zk的watcher机制acl 权限控制zk的数据模型树结构,/是根节点,节点叫做znode,一个znode对应一个文件目录。有四种类型的znodePERSISTENT 持久,znod…...

    2024/4/24 9:24:06
  18. css常见问题一

    【1】禁止换行.class {word-break:keep-all;white-space:nowrap;}【2】强制换行.class{word-break:break-all;}普通容器中(Div)的用法建议word-wrap:break-word;容器中(Div)中的表格的用法建议table-layout:fixed;word-wrap:break-word;【3】hank手法.class {background:#0…...

    2024/4/24 9:24:05
  19. 在线分词

    语料库在线汉语分词系统Word ArtDatamate Text Parser Lite腾讯文智...

    2024/4/24 9:24:05
  20. RocketMQ - 如何实现事务消息

    事务消息的使用场景 事务消息的使用场景很多,比如在电商系统中用户下单后新增了订单记录,对应的商品库存需要减少。怎么保证新增订单后商品库存减少呢?又例如红包业务,张三给李四发红包,张三的账户余额需要扣减,李四的账户余额需要增加,怎么保证张三账户扣减李四账户加钱…...

    2024/4/24 9:24:03

最新文章

  1. 【LeetCode算法】389. 找不同

    提示&#xff1a;此文章仅作为本人记录日常学习使用&#xff0c;若有存在错误或者不严谨得地方欢迎指正。 文章目录 一、题目二、思路三、解决方案 一、题目 给定两个字符串 s 和 t &#xff0c;它们只包含小写字母。字符串 t 由字符串 s 随机重排&#xff0c;然后在随机位置添…...

    2024/5/10 12:17:20
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/5/9 21:23:04
  3. 图像处理相关知识 —— 椒盐噪声

    椒盐噪声是一种常见的图像噪声类型&#xff0c;它会在图像中随机地添加黑色&#xff08;椒&#xff09;和白色&#xff08;盐&#xff09;的像素点&#xff0c;使图像的质量降低。这种噪声模拟了在图像传感器中可能遇到的问题&#xff0c;例如损坏的像素或传输过程中的干扰。 椒…...

    2024/5/10 0:23:30
  4. CSS3 高级- 复杂选择器、内容生成、变形(transform)、过渡(transition)、动画(animation)

    文章目录 一、复杂选择器兄弟选择器:选择平级元素的唯一办法属性选择器:1、通用:基本用不着,太泛了2、自定义:4种伪类选择器:1、目标伪类:2、结构伪类:3、元素状态伪类:4、伪元素选择器:应用于文字,使网页看起来想杂志5、否定伪类:选择器:not([本选择器的条件]) /*…...

    2024/5/9 22:52:41
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/5/8 6:01:22
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/5/9 15:10:32
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/5/4 23:54:56
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/5/9 4:20:59
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/5/4 23:54:56
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/5/4 23:55:05
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/5/4 23:54:56
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/5/7 11:36:39
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/5/4 23:54:56
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/5/6 1:40:42
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/5/4 23:54:56
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/5/8 20:48:49
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/5/7 9:26:26
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/5/4 23:54:56
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/5/8 19:33:07
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/5/5 8:13:33
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/5/8 20:38:49
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/5/4 23:54:58
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/5/10 10:22:18
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/5/9 17:11:10
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57