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

refine the IPC in indexMergeReaderExecutor #14333

Closed
XuHuaiyu opened this issue Jan 3, 2020 · 0 comments · Fixed by #14381
Closed

refine the IPC in indexMergeReaderExecutor #14333

XuHuaiyu opened this issue Jan 3, 2020 · 0 comments · Fixed by #14381
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Jan 3, 2020

indexMergeProcessWorker. indexMergeProcessWorker.fetchLoop use partialWorkerCnt-- to check whether all the partialWorkers finishing their work. We can use a WaitGroup to synchronize the work between all the partial workers, and start a goroutine which waits for the WaitGroup, and close the fetchCh when all the partialWorkers exit. When indexMergeProcessWorker fails to fetch data from fetchCh, it knows all the partialWorkers exit. Refer this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant