[SERVER-38295] ReplSetMonitor::getHostOrRefresh should not do anything if maxWait <= 0 Created: 28/Nov/18  Updated: 29/Oct/23  Resolved: 28/Dec/18

Status: Closed
Project: Core Server
Component/s: Networking, Replication
Affects Version/s: None
Fix Version/s: 4.1.7

Type: Improvement Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: Mathias Stearn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-21431 Sharding host targeting logic should ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2018-12-31
Participants:

 Description   

There's a TODO here with no corresponding ticket.

The getHostOrRefresh function is used in shard targeting, including from a function "findHostNoWait". The expectation for that function is that no waiting happens, even on error. Instead, we spawn an extra thread anyways even though we know we won't retry.



 Comments   
Comment by Githook User [ 28/Dec/18 ]

Author:

{'username': 'RedBeard0531', 'email': 'mathias@10gen.com', 'name': 'Mathias Stearn'}

Message: SERVER-38295 ReplSetMonitor::getHostOrRefresh should not do anything if maxWait <= 0
Branch: master
https://github.com/mongodb/mongo/commit/aa236ed4f3096c85118f00618eec834c82363527

Comment by Matthew Saltz (Inactive) [ 28/Nov/18 ]

For sharded transactions the transaction coordinator shard needs to do targeting every time we commit, so ideally we'd be able to avoid the overhead of potentially spawning a new thread for every committing transaction.

Generated at Thu Feb 08 04:48:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.