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

[core][bug] readers don't close while io exception happening #1037

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

leaves12138
Copy link
Contributor

readers don't close while io exception happening, the readers cached in the list will lose control (#1036)

Purpose

(What is the purpose of the change, or the associated issue)

Tests

(List UT and IT cases to verify this change)

API and Format

(Does this change affect API or storage format)

Documentation

(Does this change introduce a new feature)

yejunhao and others added 2 commits April 26, 2023 18:06
// if one of the readers creating failed, we need to close them all.
try {
for (SortedRun run : section) {
readers.add(readerForRun(run, readerFactory));
Copy link
Contributor

Choose a reason for hiding this comment

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

readerForRun is also used in ChangelogMergeTreeRewriter#rewriteChangelogCompaction. Consider creating a method List<RecordReader<KeyValue>> readerListForSection(List<SortedRun> section, KeyValueFileReaderFactory readerFactory).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done this

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

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.

3 participants