Open
Conversation
Open
Collaborator
|
这里我考虑的一点是将文件名作为 aof offset 的存放位置好像不太合适,我们这里需要一个 metadata 的抽象 @suxb201 WYDT |
Member
|
@Zheaoli 是的,现在的 aof file 是我之前随便写的,看 issue 反馈来看貌似有 bug,但我没能复现出来。之前也考虑换个成熟的 disk queue,但是没发现好用的库。 |
Contributor
Author
|
@Zheaoli 在这个pr中,原本也实现过在reader目录下增加一个保存元数据的文件。但后面考虑仅就增量同步这个功能,目前需要保存的信息只有 |
Contributor
|
关于这个改动,我想请教一个问题:就是在判断replay=="CONTINUE"之后,还需要多读取一个换行符这一段我没明白。按照psync协议来看,发送continue这一行之后就直接发送每一个命令了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
for issue #722
通过sync_reader同步时,支持增量同步,避免每次都进行不必要的全量同步
以允许在shake短暂中断或重启后,可以从上次同步的offset处继续进行
info replication命令获取master_replid字段文件名 + 文件大小的方式得到上次同步的offsetsync_rdb=false,尝试进行增量同步,替换PSYNC ? -1