[CDRIVER-2439] Cluster time should not be gossipped to a standalone Created: 21/Dec/17 Updated: 28/Oct/23 Resolved: 30/Apr/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.10.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jeremy Mikola | Assignee: | Jeremy Mikola |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Epic Link: | Post-3.6 cleanup | ||||
| Description |
|
In SPEC-1015, I discussed a scenario whereby I witnessed libmongoc append $clusterTime to an outgoing command to a 3.6 standalone server:
I believe this was due to libmongoc only checking if cluster time is non-NULL and OP_MSG is being used in mongoc_cmd_parts_assemble(). Depending on the outcome of SPEC-1015, I think it would be correct to also examine the server type. |
| Comments |
| Comment by Githook User [ 30/Apr/18 ] |
|
Author: {'email': 'jmikola@gmail.com', 'username': 'jmikola', 'name': 'Jeremy Mikola'}Message: These tests attempted to simulate a primary or secondary, but the isMaster |
| Comment by Githook User [ 30/Apr/18 ] |
|
Author: {'email': 'jmikola@gmail.com', 'username': 'jmikola', 'name': 'Jeremy Mikola'}Message: This addresses an edge case where an explicit session's cluster time may |
| Comment by Jeremy Mikola [ 26/Apr/18 ] |
| Comment by Jeremy Mikola [ 26/Apr/18 ] |
|
I do think the three bullets in SPEC-1015 that "advocate against sending $clusterTime to a standalone" justify addressing this. I'd argue in favor of adding && server_type != MONGOC_SERVER_STANDALONE to this line and calling it a day. |
| Comment by A. Jesse Jiryu Davis [ 26/Apr/18 ] |
|
jmikola, on SPEC-1015 Bernie wrote, "This situation seems so unlikely I don't think we should spend time changing all drivers to disallow it." Shall we make this C Driver change or ignore it? |