Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDL异常,[*mgo.QueryError] error['idIndex' is not allowed with 'autoIndexId' #256

Closed
ChenNengNeng opened this issue Nov 5, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@ChenNengNeng
Copy link

mongoshake 版本:bugfix-2.0.4,0990543b5c091c3110ee03e6c014a293aecb52fd,release,go1.10.3,2019-07-15_17:03:32
mongodb 源库版本:3.4.6 ,阿里云三实例副本集
mongodb 目标库版本:3.4.20,自建单点副本集

mongshake日志:
[2019/11/05 14:52:27 CST] [CRIT] [executor.(*Executor).execute:97] Replayer-4, executor-4, oplog for namespace[inhouse_report.$cmd] op[c] failed. error type[*mgo.QueryError] error['idIndex' is not allowed with 'autoIndexId': idIndex: { v: 2, key: { _id: 1 }, name: "_id_", ns: "inhouse_report.inner_employee" }], logs number[1], firstLog: [{ts 6755631846031097872} {op c} {g } {ns inhouse_report.$cmd} {o [{create inner_employee} {autoIndexId true} {idIndex [{v 2} {key [{_id 1}]} {name _id_} {ns inhouse_report.inner_employee}]}]} {o2 map[]} {uk map[]} {lsid <nil>} {fromMigrate false}]

源库oplog:
{ "ts" : Timestamp(1572918111, 16), "t" : NumberLong(6), "h" : NumberLong("-5595538674659810479"), "v" : 2, "op" : "c", "ns" : "inhouse_report.$cmd", "o" : { "create" : "inner_employee", "autoIndexId" : true, "idIndex" : { "v" : 2, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "inhouse_report.inner_employee" } } }

@vinllen
Copy link
Collaborator

vinllen commented Nov 6, 2019

https://jira.mongodb.org/browse/SERVER-19067
autoIndexId这个选项在3.4里面应该废弃了,不过估计代码在3.4.6里面还没有完全去除,导致同步出错了,这块后面mongoshake加个单独的适配吧,去掉autoIndexId这个field。

@vinllen vinllen added the enhancement New feature or request label Nov 6, 2019
@vinllen
Copy link
Collaborator

vinllen commented Aug 13, 2020

#400
问题将在2.4.10版本修复发布

@vinllen vinllen closed this as completed Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants