Skip to content

BUG: readPreferenceTag for analytics nodes in connection string is ignored #362

@ghost

Description

Hey folks,
I am trying to run (read-only) Atlas SQL queries via the data federation using the your JDBC driver against an Atlas replica set with one additional analytics node. I would like to execute all SQL queries on the analytical node using the following connection string: jdbc:mongodb://atlas-sql-1234.a.query.mongodb.net/sqldatabase?ssl=true&authSource=admin&retryWrites=true&readPreference=secondary&readPreferenceTags=nodeType:ANALYTICS&w=majority&appName=sql-test.

However, it looks like that the readPreferenceTags=nodeType:ANALYTICS is ignored while readPreference=secondary is applied correctly, because the monitoring data shows that the queries are executed over all secondary nodes (including the analytical node) and not on the primary node. But if I use the same connection string for a MongoDB native query language application, using the MongoDB Java driver, the queries are routed only the analytical node as expected (verified again via the monitoring data).

Any advice on how to resolve this issue is much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions