[COMPASS-5377] Should Compass implicitly set directConnection=true for single-host endpoints? Created: 20/Dec/21  Updated: 29/Oct/23  Resolved: 19/Jan/22

Status: Closed
Project: Compass
Component/s: Connectivity
Affects Version/s: None
Fix Version/s: 1.31.0

Type: Task Priority: Major - P3
Reporter: Anna Henningsen Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Related
related to COMPASS-5376 Compass ignores directConnection=false Closed
is related to COMPASS-5309 Move directConnection=true manipulati... Closed
Epic Link: COMPASS-5198
Story Points: 2
Documentation Changes: Needed
Documentation Changes Summary:

Recent versions of Compass have been setting directConnection=true in some cases (namely, when connecting to a single host without an SRV connection string, and without replSet or loadBalanced options).

Compass no longer has this behavior, and will instead not add a directConnection parameter to the connection string without the user’s knowledge. This means that when the intention is to connect to a single node of a replica set, users will need to explicitly specify directConnection=true in the connection string.

Sprint: Iteration Seoul

 Description   

We haven’t made a firm decision on this point yet, I think. We added the current behavior, which is to add directConnection=true in these cases, in COMPASS-5012 without actually having discussed it (as far as I know).

Pro:

  • It allows connecting to specific secondaries
  • It matches what mongosh does (although mongosh does this to match the legacy shell and because it is used for replset administration, neither of which affect Compass)

Con:

  • Users are not aware that this happens
  • Users may want to connect to the full replica set by default
  • It mismatches the driver’s behavior


 Comments   
Comment by Githook User [ 26/Jan/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(data-service): share connection logic with mongosh (#2683)

  • chore(data-service): share connection logic with mongosh

This addresses:

  • fixup: lint
  • chore: Package os-dns-native with Compass COMPASS-4768 (#2688)
  • chore: Externalize os-dns-native package
  • fix(connection-model): Add missing dependency
  • fixup: bump versions to fix compilation, adjust tests
  • fixup: add e2e test for SRV resolutions
  • fixup: adjust rebuild for karma in compass-connect

Co-authored-by: Sergey <petushkov.sergey@gmail.com>
Branch: 1.31-releases
https://github.com/mongodb-js/compass/commit/c5616bc998f459751c573f55be7295c4b16cf21d

Comment by Githook User [ 21/Jan/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(data-service): share connection logic with mongosh (#2683)

  • chore(data-service): share connection logic with mongosh

This addresses:

  • fixup: lint
  • chore: Package os-dns-native with Compass COMPASS-4768 (#2688)
  • chore: Externalize os-dns-native package
  • fix(connection-model): Add missing dependency
  • fixup: bump versions to fix compilation, adjust tests
  • fixup: add e2e test for SRV resolutions
  • fixup: adjust rebuild for karma in compass-connect

Co-authored-by: Sergey <petushkov.sergey@gmail.com>
Branch: COMPASS-5409-create-store
https://github.com/mongodb-js/compass/commit/c5616bc998f459751c573f55be7295c4b16cf21d

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(data-service): share connection logic with mongosh (#2683)

  • chore(data-service): share connection logic with mongosh

This addresses:

  • fixup: lint
  • chore: Package os-dns-native with Compass COMPASS-4768 (#2688)
  • chore: Externalize os-dns-native package
  • fix(connection-model): Add missing dependency
  • fixup: bump versions to fix compilation, adjust tests
  • fixup: add e2e test for SRV resolutions
  • fixup: adjust rebuild for karma in compass-connect

Co-authored-by: Sergey <petushkov.sergey@gmail.com>
Branch: COMPASS-5277-add-favorite-dialog
https://github.com/mongodb-js/compass/commit/c5616bc998f459751c573f55be7295c4b16cf21d

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(data-service): share connection logic with mongosh (#2683)

  • chore(data-service): share connection logic with mongosh

This addresses:

  • fixup: lint
  • chore: Package os-dns-native with Compass COMPASS-4768 (#2688)
  • chore: Externalize os-dns-native package
  • fix(connection-model): Add missing dependency
  • fixup: bump versions to fix compilation, adjust tests
  • fixup: add e2e test for SRV resolutions
  • fixup: adjust rebuild for karma in compass-connect

Co-authored-by: Sergey <petushkov.sergey@gmail.com>
Branch: port-to-wdio
https://github.com/mongodb-js/compass/commit/c5616bc998f459751c573f55be7295c4b16cf21d

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(data-service): share connection logic with mongosh (#2683)

  • chore(data-service): share connection logic with mongosh

This addresses:

  • fixup: lint
  • chore: Package os-dns-native with Compass COMPASS-4768 (#2688)
  • chore: Externalize os-dns-native package
  • fix(connection-model): Add missing dependency
  • fixup: bump versions to fix compilation, adjust tests
  • fixup: add e2e test for SRV resolutions
  • fixup: adjust rebuild for karma in compass-connect

Co-authored-by: Sergey <petushkov.sergey@gmail.com>
Branch: main
https://github.com/mongodb-js/compass/commit/c5616bc998f459751c573f55be7295c4b16cf21d

Comment by Githook User [ 18/Jan/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: chore(data-service): share connection logic with mongosh

This addresses:

This does not address:

Comment by Githook User [ 13/Jan/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: chore(data-service): share connection logic with mongosh

This addresses:

This does not address:

Comment by Githook User [ 13/Jan/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: chore(data-service): share connection logic with mongosh

This addresses:

This does not address:

Generated at Wed Feb 07 22:39:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.