Open leehom opened 3 months ago
首先分析一下pendingMap的状态
pengding请求过时,writeIndex调回到水位线+1作为写入点,
再看跟随者的处理 3.1.1 处理有点不解,按pendingMap分析,writeIndex2那批可能被返回不一致,处理没错,但本人认为更好的处理应该是保证写入点连续性即好,过期的请求删去就可以,一直走第二部分请求,若返回不一致,领导者进入比对,降低效率
首先分析一下pendingMap的状态
pengding请求过时,writeIndex调回到水位线+1作为写入点,
再看跟随者的处理 3.1.1 处理有点不解,按pendingMap分析,writeIndex2那批可能被返回不一致,处理没错,但本人认为更好的处理应该是保证写入点连续性即好,过期的请求删去就可以,一直走第二部分请求,若返回不一致,领导者进入比对,降低效率