[SERVER-54208] Remove blocking call to Fetcher::join from TenantMigrationDonorService Created: 02/Feb/21 Updated: 29/Oct/23 Resolved: 05/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matthew Saltz (Inactive) | Assignee: | Jason Zhang |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||||||||||||||
| Sprint: | Sharding 2021-07-12, Sharding 2021-07-26, Sharding 2021-08-09 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 34 | ||||||||||||||||||||||||
| Description |
|
I was looking at the TenantMigrationDonorService for other reasons and I noticed that in one of the future continuations we use the blocking API of the Fetcher class to do networking. This could be a problem if running in a thread pool with a fixed number of threads. Fixing this depends on making a non-blocking version of the Fetcher API ( |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 20/Sep/21 ] |
|
Author: {'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}Message: (cherry picked from commit 1f8ccdbff6715cbeb214d5b107f9598e5aeeb5e6) |
| Comment by Githook User [ 05/Aug/21 ] |
|
Author: {'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}Message: |
| Comment by Andrew Shuvalov (Inactive) [ 23/Jul/21 ] |
|
I added 2 BFs blocked by this change. |
| Comment by Jack Mulrow [ 01/Jun/21 ] |
|
This ticket isn't required for PM-1791, so moving it out of the project. |
| Comment by Jack Mulrow [ 08/Mar/21 ] |
|
After looking at this again, the fetcher uses a per instance thread pool, but the blocking wait happens on the shared service thread pool, so my earlier comment was incorrect. |
| Comment by Matthew Saltz (Inactive) [ 12/Feb/21 ] |
|
Got it, thanks for looking into it! |
| Comment by Jack Mulrow [ 12/Feb/21 ] |
|
The blocking call does happen in a fixed size thread pool, but it's a pool that is exclusively owned by a single tenant migration donor service instance and only used sequentially in the main future chain for driving a migration (for the fetcher call and to send recipientSyncData and recipientForgetMigration), so while the thread is blocked, there shouldn't be other work that is unable to run. Because of this, I don't think this change would impact the correctness of the donor service, so I don't think it's worth doing at this time and I'm closing this as Won't Do. |