Closed admh closed 4 years ago
同步原因不是跟不上,而是本身已经报错了,用户没有关注。
{ts 6767355749539512321} {op u} {g } {ns cash_loan.marketUser} {o [{$set [{employmentName BL PHOTOSTSTE} {monthlySalary 15000} {occupation other} {officeAddress shop no 09 opp govt see. sec. school} {officeAddressDetail [{state Haryana} {city Sirsa} {detail shop no 09 opp govt see. sec. school}]} {officePINCode 125055} {updatedAt 2019-12-06 15:56:35.081 +0000 UTC} {workingSince 2016-08-12 15:54:32.408 +0000 UTC}]} {$set [{employmentName BL PHOTOSTSTE} {monthlySalary 15000} {occupation other} {officeAddress shop no 09 opp govt see. sec. school} {officeAddressDetail [{state B} {city A} {detail xxxx}]} {officePINCode 125015} {updatedAt 2019-12-06 15:56:35.081 +0000 UTC} {workingSince 2016-08-12 15:54:32.408 +0000 UTC}]}]} {o2 map[_id:ObjectIdHex("5dea78e5fc4a0200112f1f5a")]} {uk map[]} {lsid map[id:{4 [196 17 34 254 189 104 70 75 188 245 207 58 100 243 119 101]} uid:[xxxx]]} {fromMigrate false}
releate to #258
请给一下原始的日志信息,看起来是有2个$set
导致的。
{
"ts" : Timestamp(1575647795, 1),
"t" : NumberLong(2),
"h" : NumberLong(-5331062152699164081),
"v" : 2.0,
"op" : "u",
"ns" : "cash_loan.marketUser",
"ui" : UUID("fd1e33c1-dba9-4a9f-82e7-4720ee8e0abb"),
"o2" : {
"_id" : ObjectId("5dea78e5fc4a0200112f1f5a")
},
"wall" : ISODate("2019-12-06T15:56:35.079+0000"),
"lsid" : {
"id" : UUID("c41122fe-bd68-464b-bcf5-cf3a64f37765"),
"uid" : BinData(0, "V0VQACSguONcJscaTvkXYFE6iXAf2Urk.. 8 more bytes")
},
"txnNumber" : NumberLong(153),
"stmtId" : 0.0,
"prevOpTime" : {
"ts" : Timestamp(0, 0),
"t" : NumberLong(-1)
},
"o" : {
"$v" : 1.0,
"$set" : {
"employmentName" : "BL PHOTOSTSTE",
"monthlySalary" : 15000.0,
"occupation" : "other",
"officeAddress" : "shop no 09 opp govt see. sec. school",
"officeAddressDetail" : {
"state" : "",
"city" : "A",
"detail" : "xxxx"
},
"officePINCode" : "125015",
"updatedAt" : ISODate("2019-12-06T15:56:35.081+0000"),
"workingSince" : ISODate("2016-08-12T15:54:32.408+0000")
}
}
}
mongoshake写入的日志格式解析:
{ts 6767355749539512321}
{op u}
{g }
{ns cash_loan.marketUser}
{o
[
{$set[
{employmentName BL PHOTOSTSTE}
{monthlySalary 15000}
{occupation other}
{officeAddress shop no 09 opp govt see. sec. school}
{officeAddressDetail
[
{state Haryana}
{city Sirsa}
{detail shop no 09 opp govt see. sec. school}
]}
{officePINCode 125055}
{updatedAt 2019-12-06 15:56:35.081 +0000 UTC}
{workingSince 2016-08-12 15:54:32.408 +0000 UTC}
]
}
{$set [
{employmentName BL PHOTOSTSTE}
{monthlySalary 15000}
{occupation other}
{officeAddress shop no 09 opp govt see. sec. school}
{officeAddressDetail
[
{state Haryana}
{city Sirsa}
{detail shop no 09 opp govt see. sec. school}
]}
{officePINCode 125055}
{updatedAt 2019-12-06 15:56:35.081 +0000 UTC}
{workingSince 2016-08-12 15:54:32.408 +0000 UTC}
]
}
]
}
{o2 map[_id:ObjectIdHex("5dea78e5fc4a0200112f1f5a")]}
{uk map[]}
{lsid map[id:{4 [196 17 34 254 189 104 70 75 188 245 207 58 100 243 119 101]}
uid:[87 69 80 0 36 160 184 227 92 38 199 26 78 249 23 96 81 58 137 112 31 217 74 228 231 186 78 41 65 5 10 221]]}
{fromMigrate false}
目前看起来是mongoshake写入了2个$set导致
报错整个日志:
[2019/12/09 10:56:53 CST] [CRIT] [executor.(*Executor).execute:97] Replayer-4, executor-4, oplog for namespace[cash_loan.agendaJobs] op[u] failed. error type[*errors.errorString] error[doUpdate run upsert/update[true] failed[Updating the path 'lockedAt' would create a conflict at 'lockedAt']], logs number[1], firstLog: [{ts 6767355878388531415} {op u} {g } {ns cash_loan.agendaJobs} {o [{$set [{lockedAt 2019-12-06 15:57:05.973 +0000 UTC}]} {$set [{lockedAt 2019-12-06 15:57:05.973 +0000 UTC}]}]} {o2 map[_id:ObjectIdHex("5d8477d3b3b6a021dc4450ab")]} {uk map[]} {lsid <nil>} {fromMigrate false}]
请问下,问题有解决么? 我同样遇到了该问题
2.4.4版本将会修复,参见:#345
问题: 从阿里云印度公网同步到阿里云深圳,经常出现同步跟不上的问题。如下图。
环境: 印度阿里云 mongodb 版本 4.0(云 mongodb,2 核 4G),mongoshake ecs主机(运行在印度)配置是 2 核 16G,CentOS7.6 系统。深圳阿里云 mongodb 为 docker 容器自建 3.6 版本,ecs主机配置是 16 核 48G(这个负载一直正常)。
深圳 mongodb 配置文件:
mongoshake 版本:1.4.5
印度mongoshake配置文件:
同步跟不上的截图: