-
Notifications
You must be signed in to change notification settings - Fork 399
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
recover readers exactly from checkpoint #1620
Merged
Merged
Conversation
This file contains 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
henryzhx8
requested changes
Jul 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- checkpoint恢复时不要收到队列长度20的限制;
- 确认一下升级的那一下,checkpoint里没有idx字段的情况
commit c8385ca Author: henryzhx8 <[email protected]> Date: Fri Jul 19 09:42:31 2024 +0800 fix core caused by concurrent use of non-thread-safe gethostbyname (alibaba#1611) * fix core caused by concurrent use of non-thread-safe gethostbyname commit 8fc252e Author: Qiu Fengshuo <[email protected]> Date: Thu Jul 18 09:42:06 2024 +0800 speedup CI UT job (alibaba#1606) * Split the original UT CI job into two separate jobs: one with SPL and one without SPL * fix: change design. Build .a and .so at the same CI UT job * fix * fix * fix * fix * fix * fix * fix
需要针对性的给出e2e测试场景构造,让这些场景都有机会触发。专门记个任务吧。 |
henryzhx8
requested changes
Jul 22, 2024
yyuuttaaoo
reviewed
Jul 22, 2024
yyuuttaaoo
approved these changes
Jul 23, 2024
henryzhx8
approved these changes
Jul 23, 2024
messixukejia
approved these changes
Jul 23, 2024
Abingcbc
added a commit
to Abingcbc/ilogtail
that referenced
this pull request
Jul 23, 2024
Abingcbc
added a commit
to Abingcbc/ilogtail
that referenced
this pull request
Jul 23, 2024
Abingcbc
added a commit
to Abingcbc/ilogtail
that referenced
this pull request
Jul 23, 2024
linrunqi08
pushed a commit
that referenced
this pull request
Jul 23, 2024
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.
问题
之前在从checkpoint恢复reader时,无论之前reader在哪个位置,都会将reader放置到readerArray中,然后在后续移动到正确的位置。
如果出现日志轮转文件数量大于readArray最大大小时,并且出现inode复用,就会出现readerArray顺序错误(readerArray强要求,reader顺序按照文件轮转降序排列,即 log.2 log.1 log)
目前,已知导致的问题:
解决方法
在checkpoint中新增字段,保存reader在readerArray中的位置。
-2:不在队列中
-1:默认值,新建的reader,需要放置到readerArray末尾
>0:在readerArray中的实际位置
在从checkpoint中恢复的时候,根据不同的值,恢复reader到之前准确的位置。