[SERVER-38741] Mongodb replset member fails to start "CannotGrowDocumentInCappedNamespace: Cannot change the size of a document" Created: 21/Dec/18  Updated: 21/Dec/18  Resolved: 21/Dec/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.4.18
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: raffis Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-38724 Under rare conditions, updates to cap... Closed
Operating System: ALL
Steps To Reproduce:

I am certainly aware of the fact that a capped collection can not be changed. But this happens on a replset member.

How did such an entry made it into the primary oplog?

It would have failed on the primary member first, before such an entry even makes it into the oplog in the first place.

 And the mentioned document does not change in size on the primary.  It could not have been created in the first place if it would!

 

Not sure how to reproduce this, but this is the second time we encountered this within two months.

Participants:

 Description   

mongod start:

 

2018-12-21T16:35:55.467+0100 I ASIO [NetworkInterfaceASIO-RS-0] Successfully connected to mongodb001.replset001.app.domain:27017, took 7ms (3 connections now open to mongodb001.replset001.app.domain27017)
2018-12-21T16:36:00.844+0100 I NETWORK [conn10098] received client metadata from 192.168.100.192:44896 conn10098: { driver:

{ name: "mongoc / ext-mongodb:PHP", version: "1.13.0 / 1.5.3" }

, os: { type: "Linux", name: "Debian GNU/Linux", version: "9", architecture: "x86_64" }, platform: "cfg=0xd15620c9 posix=200809 stdc=201112 CC=GCC 6.3.0 20170516 CFLAGS="-g -O2" LDFLAGS="" / PHP 7.2.13" }
2018-12-21T16:37:27.830+0100 F REPL [repl writer worker 5] writer worker caught exception: 10003 Cannot change the size of a document in a capped collection: 71 != 86 on: { ts: Timestamp 1545406647000|4, h: -308296782776005596, v: 2, op: "u", ns: "app.taskscheduler.jobs", o2:

{ _id: ObjectId('5c1d087b95aa0a02386e9843') }

, o: { $set:

{ status: 3, ended: new Date(1545406647813) }

} }
2018-12-21T16:37:27.830+0100 I - [repl writer worker 5] Fatal assertion 16359 CannotGrowDocumentInCappedNamespace: Cannot change the size of a document in a capped collection: 71 != 86 at src/mongo/db/repl/sync_tail.cpp 1087
2018-12-21T16:37:27.830+0100 I - [repl writer worker 5]

***aborting after fassert() failure

 

Restart results in the same error.



 Comments   
Comment by Danny Hatcher (Inactive) [ 21/Dec/18 ]

Hello,

Thanks for your report. This situation appears to be a duplicate of SERVER-38724. We've seen this happen when the size of a capped collection is slightly different on the Secondary than the Primary which could be the result of data fragmentation. As of right now, the only known workaround is to resync the affected node.

I advise you to watch SERVER-38724 for updates.

Thank you,

Danny

Generated at Thu Feb 08 04:49:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.