Skip to content

Execute batch v2 Implementation#2427

Closed
harshit-gangal wants to merge 17 commits intovitessio:masterfrom
Flipkart:execute_batch_v2
Closed

Execute batch v2 Implementation#2427
harshit-gangal wants to merge 17 commits intovitessio:masterfrom
Flipkart:execute_batch_v2

Conversation

@harshit-gangal
Copy link
Copy Markdown
Member

@harshit-gangal harshit-gangal commented Jan 3, 2017

This will be used as framework to support execute batch planning and execution phase.
This PR is dependent on #2423


This change is Reviewable

@harshit-gangal harshit-gangal changed the title Execute batch v2 Framework Execute batch v2 Implementation Jan 5, 2017
@harshit-gangal harshit-gangal changed the title Execute batch v2 Implementation [WIP] Execute batch v2 Implementation Jan 5, 2017
@harshit-gangal
Copy link
Copy Markdown
Member Author

Currently this PR acts as model for batchParallel code changes.

@harshit-gangal harshit-gangal changed the title [WIP] Execute batch v2 Implementation Execute batch v2 Implementation Jan 10, 2017
@harshit-gangal
Copy link
Copy Markdown
Member Author

@sougou PR up for review.

@harshit-gangal
Copy link
Copy Markdown
Member Author

@sougou - There is race condition in batch execute parallel code. Kindly check once.


Review status: 0 of 43 files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

Copy link
Copy Markdown
Contributor

@sougou sougou left a comment

Choose a reason for hiding this comment

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

Changes look good overall. There's one suggested design change.

I'm still not fully comfortable with the query executor design, but can't think of a better alternative yet. We'll keep our minds open in that area for future improvements.

@@ -0,0 +1,126 @@
package engine
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This sounded like a good idea when we discussed. But now I see that it makes everything awkward. I think the code will be much simpler if this was done in router.go. Just iterate, get plan & execute.

This approach will probably make sense if we decide to do the phases, but I think we may never do that if the parallel thing works out.

}(index, plan)

}
go func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Found the bug: you need to wait for this function to also complete before returning.
Also, this function will currently never return because you're not closing ch anywhere.

@sougou
Copy link
Copy Markdown
Contributor

sougou commented Feb 2, 2017

The data race problem happens because we're now concurrently accessing the same topo info because of the parallelism. So, we need to improve the test framework to handle this. The non-sandbox code already allows concurrency for those calls.

@harshit-gangal
Copy link
Copy Markdown
Member Author

As per the discussion, this needs to be re-written.
Hence closing as of now.

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