fix db failover
Merge pull request #236 from will123195/3.0

fix db failover