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

Ignore the previous job_id inside fill_reservations() #141

Merged
merged 3 commits into from
Aug 17, 2022

Conversation

yahoNanJing
Copy link
Contributor

Which issue does this PR close?

Closes #138.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@yahoNanJing
Copy link
Contributor Author

Hi @thinkharderdev, could you help review this PR?

@yahoNanJing yahoNanJing mentioned this pull request Aug 15, 2022
18 tasks
@andygrove
Copy link
Member

@yahoNanJing It looks like this was building on another PR that has now been merged. Could you rebase / upmerge so we can see the changes specific to this PR?

@yahoNanJing
Copy link
Contributor Author

Thanks @andygrove. Just rebased. I will follow the order listed in #129 to raise PRs for a few performance improvements.

if let Some(output_links) =
self.output_links.get_mut(&unresolved_shuffle.stage_id)
{
if !output_links.contains(&self.current_stage_id) {
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to make output_links a HashSet instead of a Vec, given that duplicate values are not allowed?


if let Some(deps) = self.stage_dependencies.get_mut(&self.current_stage_id) {
deps.push(unresolved_shuffle.stage_id)
if !deps.contains(&unresolved_shuffle.stage_id) {
Copy link
Member

Choose a reason for hiding this comment

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

Same question here - would HashSet make more sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For deps and output_links, there will not be many elements. I think that's why it uses vec rather than the set 🤣 . I'm OK to change it to be set.

Copy link
Member

Choose a reason for hiding this comment

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

I don't have a strong opinion on this. Set would reduce the code complexity slightly but possibly add some overhead. 🤷‍♂️

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

I left a couple questions but LGTM. Thanks @yahoNanJing!

@andygrove andygrove merged commit b72fdd3 into apache:master Aug 17, 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.

Ignore the previous job_id inside fill_reservations()
3 participants