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 trigger listeners when open engine #134

Merged
merged 3 commits into from
Oct 28, 2021

Conversation

MrCroxx
Copy link
Member

@MrCroxx MrCroxx commented Oct 28, 2021

Fix listeners' post_new_log_file not triggered when reopening
engine with existing log files in #132 .

Add test to check if listeners have been triggered when recovering.

Signed-off-by: MrCroxx mrcroxx@outlook.com

Fix listeners' post_new_log_file not triggered when reopening
engine with existing log files in [tikv#132 ].

Add test to check if listeners have been triggered when recovering.

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@MrCroxx
Copy link
Member Author

MrCroxx commented Oct 28, 2021

@tabokie PTAL

src/engine.rs Outdated
Comment on lines 620 to 621
assert!(hook.0[&LogQueue::Append].files() > 0);
assert!(hook.0[&LogQueue::Rewrite].files() > 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert they are equal to file_span().

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Copy link
Member

@tabokie tabokie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should still test it in test_pipe_log_listeners, rest looks good.

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@tabokie tabokie merged commit bebfe85 into tikv:master Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants