在主要-次要Mongo数据库集中,如果您不慎写入次要数据库,它将反映在主要/次要数据库中吗? [英] In a primary-secondary Mongo db set if you accidentally write to a secondary would it reflect in primary it gets routed to primary

查看:127
本文介绍了在主要-次要Mongo数据库集中,如果您不慎写入次要数据库,它将反映在主要/次要数据库中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的mongodb集中,我们有1个主要的和3个辅助的.意外地在辅助服务器上执行了写操作,并且该写操作已更新为包括主服务器在内的其他成员.不确定更新是否路由到主服务器,或者在mongodb中是否可能对辅助服务器进行写操作?时间.

In our mongodb set we have 1 primary and 3 secondaries. Accidentally a write was done on a secondary and the write was updated to other members including a primary.Not sure if the update was routed to primary or that a write to a secondary is possible in mongodb?One of the members was under recovery mode during the time.

推荐答案

无法写入MongoDB副本集中的辅助副本.

It is not possible to write to a secondary in MongoDB replica set.

如果写入成功,它将转到主数据库(从那里复制到所有辅助数据库).

If the write succeeded it went to a primary (from there it replicates to all secondaries).

其他节点的状态(恢复,启动)与此无关.辅助节点根本无法接受写入(通过复制机制除外).

The state of other nodes (recovering, startup) is not relevant to this. Secondaries simply cannot accept writes (except via the replication mechanism).

这篇关于在主要-次要Mongo数据库集中,如果您不慎写入次要数据库,它将反映在主要/次要数据库中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆