Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete old sst files when re-downloading sst files in full synchronization #2186

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

wangshao1
Copy link
Collaborator

@wangshao1 wangshao1 commented Dec 7, 2023

When RsyncClient(https:/OpenAtomFoundation/pika/blob/unstable/src/rsync_client.cc) downloads a sst file in a master-slave replication, if the request times out more than the set number of times, it will retry downloading the entire file. Currently, the path used to delete temporary files is incorrect, resulting in deletion failure. When re-downloading, the old file is actually appended, which ultimately leads to an sst file mismatch with the manifest and a RocksDBiine open failure.

Chinese:

rsync主从复制下载sst文件时,如果请求超时超过设定的次数,会重试下载整个文件。目前的实现中删除临时文件时的路径不对,所以导致删除失败,重新下载的时候实际是在追加写老的文件,最终导致sst文件与manifest不匹配,rocksdb打开失败。

@github-actions github-actions bot added ☢️ Bug Something isn't working Invalid PR Title labels Dec 7, 2023
@AlexStocks AlexStocks changed the title bugfix fix rsync when request timeout bugfix: fix rsync when request timeout Dec 7, 2023
@chejinge chejinge changed the title bugfix: fix rsync when request timeout fix: fix rsync when request timeout Dec 7, 2023
@wangshao1 wangshao1 changed the title fix: fix rsync when request timeout 修复rsync主从复制请求超时之后重新下载sst文件时没有删除旧文件导致的sst文件与预期不符的问题 Dec 7, 2023
@wangshao1 wangshao1 changed the title 修复rsync主从复制请求超时之后重新下载sst文件时没有删除旧文件导致的sst文件与预期不符的问题 fix: 修复rsync主从复制请求超时之后重新下载sst文件时没有删除旧文件导致的sst文件与预期不符的问题 Dec 7, 2023
@AlexStocks AlexStocks changed the title fix: 修复rsync主从复制请求超时之后重新下载sst文件时没有删除旧文件导致的sst文件与预期不符的问题 fix: delete old sst files when re-downloading sst files in full synchronization Dec 7, 2023
@AlexStocks AlexStocks changed the title fix: delete old sst files when re-downloading sst files in full synchronization bugfix: delete old sst files when re-downloading sst files in full synchronization Dec 7, 2023
@AlexStocks AlexStocks changed the title bugfix: delete old sst files when re-downloading sst files in full synchronization fix: delete old sst files when re-downloading sst files in full synchronization Dec 7, 2023
@chejinge chejinge merged commit a6d90d8 into OpenAtomFoundation:unstable Dec 8, 2023
13 checks passed
chejinge pushed a commit that referenced this pull request Dec 12, 2023
…ronization (#2186)

* bugfix fix rsync when request timeout
bigdaronlee163 pushed a commit to bigdaronlee163/pika that referenced this pull request Jun 8, 2024
cheniujh pushed a commit to cheniujh/pika that referenced this pull request Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.5.3 ☢️ Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants