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: panic send on closed channel in reader pkg #220

Merged
merged 3 commits into from
Dec 1, 2022

Conversation

veezhang
Copy link
Contributor

@veezhang veezhang commented Nov 18, 2022

fix: panic send on closed channel in reader pkg

The number of times statsMgr.StatsCh <- base.NewFileDoneStats(filename) has reached the number of readers,
then <-statsMgr.DoneCh return, but not all readers have exited.
So, it's need to wait for it exit.

@veezhang
Copy link
Contributor Author

fix #219 #95

@veezhang veezhang changed the title fix: incomplete import, or even panic [wip]fix: incomplete import, or even panic Nov 18, 2022
Copy link
Contributor

@yixinglu yixinglu left a comment

Choose a reason for hiding this comment

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

Could you reproduce the bug reported in these issues? And do you verify the solution?

// fix issues/219
// May cause base.FILEDONE to send multiple times, so <-statsMgr.DoneCh return, and then program exit.
// It may lead to incomplete import, or even panic.
return
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused about the  purpose of this return. Even though without this return, this function still always exit when it reaches here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I am solving. It's wip.

@veezhang veezhang force-pushed the master branch 3 times, most recently from 12c8581 to 1ef9e5e Compare November 18, 2022 06:31
@veezhang veezhang changed the title [wip]fix: incomplete import, or even panic fix: panic send on closed channel in reader pkg Nov 18, 2022
@veezhang veezhang changed the title fix: panic send on closed channel in reader pkg [wip]fix: panic send on closed channel in reader pkg Nov 19, 2022
@veezhang veezhang changed the title [wip]fix: panic send on closed channel in reader pkg fix: panic send on closed channel in reader pkg Nov 25, 2022
Copy link
Contributor

@yixinglu yixinglu left a comment

Choose a reason for hiding this comment

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

LGTM

@yixinglu yixinglu merged commit 7e2bd76 into vesoft-inc:master Dec 1, 2022
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.

2 participants