read_preference_tags are not registered correct in the ReadPrecence Object
Hi All,
I'm trying to pass a read preference tags in my URI:
Using the following command: mongo_connection = connect(host=config.MONGO_CONNECTION_URI)
With the following URI: 'mongodb://root:[email protected]:27017,2.2.2.2:27017,3.3.3.3:27017/api?replicaSet=s0&readPreference=secondary&readPreferenceTags=region:us-west-2,usage:api'
But the result I get when looking at the mongoclient created
MongoClient(host=['1.1.1.1:27017', '2.2.2.2:27017', '3.3.3.3:27017'], document_class=dict, tz_aware=False, connect=True, replicaset='s0', readpreference='secondary', readpreferencetags=[{'region': 'us-west-2', 'usage': 'api'}], read_preference=Secondary(tag_sets=None, max_staleness=-1, hedge=None))
you can see tag_sets is empty and it's not taken into account, Please advise what is the best way to use read preference tags with MongoEngine