-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.9.0
-
Component/s: Server Selection
-
None
-
Environment:Development
This is in reference to https://jira.mongodb.org/browse/RUBY-1281 ticket. I have added the db configuration and what error I think prevails.
I am trying to upgrade the mongo gem from 2.4.3 to 2.9.0. In the process, when I try to use a replica set, I am getting an issue in writing to the database. The reads are however fine.
When going through the code for server selection in selectable.rb, the select_server action, I see that select(cluster.servers) action call returns an empty array in case of selecting a server to write to.
My database configuration is:
{
"default"=>
{
"database"=>"test_database",
"hosts"=>["localhost:27018", "localhost:27019", "localhost:27020"],
"options"=>{
"read"=>
,
"max_pool_size"=>1,
"connect"=>:replica_set,
"replica_set"=>"rs0",
"platform"=>"mongoid-6.2.1"
}
}
}