处理MongoDB升级后出现的'DatabaseVersion.timestamp'错误
原文英文,约500词,阅读约需2分钟。发表于: 。Recently, one of our customers reported a problem after upgrading a sharded cluster from MongoDB 5.0 to 6.0. The upgrade of data-bearing nodes was fine, but in the final part of the process, where...
最近,一位客户在将MongoDB从5.0升级到6.0后,重启mongos路由器时遇到错误,导致查询失败。日志显示缺少'BSON字段DatabaseVersion.timestamp'。这是因为未执行MongoDB 6.0新增的刷新路由表步骤。通过执行`db.adminCommand("flushRouterConfig")`解决了问题。这提醒我们要仔细阅读新版本说明,避免遗漏关键步骤。