-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The behavior around whitespace in replica set seed list strings is unclear. Currently, HostAndPort::parseThrowing allows whitespace and trimming was not originally implemented. When whitespace is present it is simply included as part of the hostname (e.g., " host0"), which may lead to inconsistent or unexpected downstream behavior.
For example, the following test currently passes because the whitespace is treated as part of the hostname:
TEST(parseReplSetSeedList, AllowWhitespaceInHostName) { const auto [name, seeds] = parseReplSetSeedList("name/ host0:1000"); ASSERT(name == "name"); ASSERT(seeds.size() == 1); }
It’s worth exploring how replica set seed strings are generated and used downstream to determine whether stricter validation or trimming should be applied. Formalizing whitespace handling would help ensure more consistent and predictable behavior across the board.
- is related to
-
SERVER-102833 parseReplSetSeedList() needs testing
-
- In Code Review
-
-
SERVER-106540 Investigate empty string usage in replica set seed list and sharding JS tests
-
- Backlog
-
- related to
-
SERVER-106540 Investigate empty string usage in replica set seed list and sharding JS tests
-
- Backlog
-