Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4120

read mode secondary not work

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      I use the Mongoid 5.0 beta, the configuration

      production: 
        clients: 
          default: 
            database: shou_be_production
            hosts: 
              - mongodb-rs1:27017 # This is the primary
              - mongodb-rs0:27017 # This is secondary
              - mongodb-rs2:27017 # This is secondary
            options: 
              write: 
                w: 1
              read: 
                mode: :secondary
              heartbeat_frequency: 5
              server_selection_timeout: 10
              max_pool_size: 128
              min_pool_size: 32
              wait_queue_timeout: 5
              connect_timeout: 5
              socket_timeout: 5
              replica_set: rs0
      

      I can see many connections coming from the Rails app in the mongodb secondary log, but in the unicorn.stdout.log I only find logs to the primary node

      MONGODB | mongodb-rs1:27017 | shou_be_production.find 
      

      Is this an typo in log or an bug? Or am I using it incorrectly?

            Assignee:
            Unassigned Unassigned
            Reporter:
            vecio vecio
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: