MongoDB DEV · 题目 209 · 单选

Consider a collection called reviews which consists of documents with the following fields: product_name (string) this field is not unique as there are several products with the same prefix product_id (ObjectId) this field has several duplicates as popular products get more reviews review (string) almost unique across all documents, only a few duplicate values reviewer_id (string) this field has a few values that are in many document for frequent reviewers, these are the exception as most people only give a few reviews rating (integer) this field contains a value from 1 to 5 reviewed_at (Timestamp) almost unique across all documents, only a few duplicate values _id (ObjectId) automatically created on insert, unique across all documents Which of the following shard keys below is the best of those listed to support queries on the reviews collection? review (string) Which of the following are true of the configuration for this replica set? Choose the best answer:

题目选项

  1. A.
    It is configured as a voting-only node, an arbiter.
  2. B.
    It is configured as a hidden node.
  3. C.
    It has one member configured, which has a single vote.

答案置信度:低

正确答案:C

解析语言:中文

本题题干串题:前半段是 reviews 集合选最佳分片键的题,后半段才是副本集配置的题,而选项属于后者,且关键上下文(rs.conf() 配置文档)整段丢失。与这组选项对应的原题是单节点副本集配置(members 只有一个、votes: 1、hidden: false、arbiterOnly: false),据此唯一成立的描述是配置了一个成员、拥有 1 票,即 C;A(仲裁/仅投票节点)与 B(隐藏节点)都与该配置矛盾。因题干损坏、上下文缺失,本题置信度低,建议核对原始题目。

所在套题

此题在题库中有 2 条记录。公开详情合并相同题干和选项;完整公开题展示置信度最高的一条记录,其他题目仅展示摘要。按套学习保留每条记录原有的答案、解析和置信度。

作者 · 作品 · 开源

作者与 MongoDB 作品

专注数据平台、MongoDB 迁移同步与云运维产品研发。

有任何 MongoDB 需求,均可联系作者。

联系作者 ↗mlhp123@outlook.com

支持作者

如果题库对您有帮助,欢迎自愿扫码打赏。

支付宝扫码打赏作者打开打赏原图 ↗