-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.4
-
Component/s: Storage
-
None
-
ALL
-
This issue happens on both 2.4 and 2.6.
This behaviour may not cause issues in 2.4. However, in 2.6, looks like the implementation of convertToCapped is changed, and the missing collection could cause issues when trying to convert this collection to a capped collection on the primary.
In 2.6.0/2.6.1, the secondaries would hit SERVER-13750 and abort.
Since 2.6.2, the secondaries would not abort, however it would fail to apply the convertToCapped operation.
2014-09-17T14:38:37.000+1000 [repl writer worker 1] warning: repl Failed command { convertToCapped: "docs", size: 10000.0 } on test with status NamespaceNotFound source collection test.docs does not exist during oplog application
Then if we add a document to this collection on the primary, the write operation could be replicated to the secondaries successfully. However, the collection would be a capped collection on the primary, while the same collection on the secondaries are not capped collections:
- Primary:
> db.docs.stats() { "ns" : "test.docs", "count" : 1, "size" : 36, "avgObjSize" : 36, "storageSize" : 12288, "numExtents" : 1, "nindexes" : 1, "lastExtentSize" : 12288, "paddingFactor" : 1, "systemFlags" : 1, "userFlags" : 0, "totalIndexSize" : 8176, "indexSizes" : { "_id_" : 8176 }, "capped" : true, "max" : NumberLong("9223372036854775807"), "ok" : 1 }
- Secondary:
> db.docs.stats() { "ns" : "test.docs", "count" : 1, "size" : 48, "avgObjSize" : 48, "storageSize" : 8192, "numExtents" : 1, "nindexes" : 1, "lastExtentSize" : 8192, "paddingFactor" : 1, "systemFlags" : 1, "userFlags" : 1, "totalIndexSize" : 8176, "indexSizes" : { "_id_" : 8176 }, "ok" : 1 }
- related to
-
SERVER-13750 ConvertToCapped on empty collection aborts after invariant() failure
- Closed