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
[FLINK-8089] Also check for other pending slot requests in SlotPool#offerSlot #5090
Conversation
b04dda4
to
32269bc
Compare
Not only check for a slot request with the right allocation id but also check whether we can fulfill other pending slot requests with an unclaimed offered slot before adding it to the list of available slots. This closes apache#5090.
32269bc
to
b04dda4
Compare
Not only check for a slot request with the right allocation id but also check whether we can fulfill other pending slot requests with an unclaimed offered slot before adding it to the list of available slots. This closes apache#5090.
b04dda4
to
c39ac05
Compare
Not only check for a slot request with the right allocation id but also check whether we can fulfill other pending slot requests with an unclaimed offered slot before adding it to the list of available slots. This closes apache#5090.
@@ -383,6 +386,76 @@ public void testSlotRequestCancellationUponFailingRequest() throws Exception { | |||
} | |||
} | |||
|
|||
/** | |||
* Tests that unused offered slots are directly used to fulfil pending slot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Inconsistent British and American English
fulfill instead of fulfil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, will use the american version
|
||
assertTrue(slotPoolGateway.offerSlot(taskManagerLocation, taskManagerGateway, slotOffer).get()); | ||
|
||
// the slot offer should fulfil the second slot request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
c39ac05
to
257d928
Compare
Not only check for a slot request with the right allocation id but also check whether we can fulfill other pending slot requests with an unclaimed offered slot before adding it to the list of available slots. This closes apache#5090.
The cluster entrypoints start the ResourceManager with the web interface URL. This URL is used to set the correct tracking URL in Yarn when registering the Yarn application. This closes apache#5128.
This commit introduces the SlotContext which is an abstraction for the SimpleSlot to obtain the relevant slot information to do the communication with the TaskManager without relying on the AllocatedSlot which is now only used by the SlotPool. This closes apache#5088.
Before logical slots like the SimpleSlot and SharedSlot where associated to the actually allocated slot via the AllocationID. This, however, was sub-optimal because allocated slots can be re-used to fulfill also other slot requests (logical slots). Therefore, we should bind the logical slots to the right id with the right lifecycle which is the slot request id. This closes apache#5089.
Not only check for a slot request with the right allocation id but also check whether we can fulfill other pending slot requests with an unclaimed offered slot before adding it to the list of available slots. This closes apache#5090.
257d928
to
331ce82
Compare
Thanks for the review @GJL. Merging this PR. |
What is the purpose of the change
Not only check for a slot request with the right allocation id but also check
whether we can fulfill other pending slot requests with an unclaimed offered
slot before adding it to the list of available slots in
SlotPool
.This PR is based on #5089.
Verifying this change
SlotPoolTest#testFulfillingSlotRequestsWithUnusedOfferedSlots
to check that unused offered slots are directly used to fulfill other pending slot requestsDoes this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation
CC: @GJL