[SERVER-9501]  initial sync exception: 10083 create collection invalid size spec Created: 29/Apr/13  Updated: 11/Jul/16  Resolved: 27/Aug/13

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.4.3
Fix Version/s: 2.4.7, 2.5.3

Type: Bug Priority: Major - P3
Reporter: Javi Díaz Assignee: Kyle Erf
Resolution: Done Votes: 4
Labels: mongos, sharding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

python 2.7, mongodb and driver 2.4 over ubuntu server 12.04 64bits


Issue Links:
Related
Backwards Compatibility: Fully Compatible
Participants:

 Description   
Issue Status as of October 22nd, 2013

ISSUE SUMMARY
Collections with size:0 will trigger an assertion in v2.4 when running initialSync for a new replica set member or running mongorestore.

USER IMPACT
With MongoDB v2.2 and before it was permitted to create a collection with an initial size specified as 0 using the createCollection command. These collections will trigger an assertion in v2.4 when trying to sync a new replica set member or run mongorestore. The user will see the message: initial sync exception: 10083 create collection invalid size spec if they encounter this situation.

It is present in versions of MongoDB between v2.4.0 and v2.4.6, inclusive.

SOLUTION
The assertion was changed to allow collections of size:0 to be created.

WORKAROUNDS
Users can either create and remove a dummy document or drop and create the collection using the default size value to allow initialSync to proceed. In order to run mongorestore on a database with an affected collection, first restore with v2.2, take one of the actions listed above and then restart with v2.4.

PATCHES
Production release v2.4.7 contains the fix for this issue, and production release v2.6.0 will contain the fix as well.

Original Description

We are get continuosly this exception message: "initial sync exception: 10083 create collection invalid size spec" each time we try to start up one of our shards.

We have been looking for corrupt collections and documents all over the system as it looks to be related to a bson object size, but can´t find why this is happening over and over, and there is not information about this error message. Also, we had tried db.repairDatabase() and get the same exception on both shards.

We found where this is generated on cpp code on git https://github.com/mongodb/mongo/blob/master/src/mongo/db/pdfile.cpp at line 276

thanks in advance, help will be welcomed
Javi



 Comments   
Comment by auto [ 02/Oct/13 ]

Author:

{u'username': u'3rf', u'name': u'Kyle Erf', u'email': u'kyle.erf@10gen.com'}

Message: SERVER-9501: initial sync exception: 10083 Changed validation to allow explicit creation of size 0 collections. Should be backported to 2.4.X

Signed-off-by: Matt Kangas <matt.kangas@10gen.com>
Branch: v2.4
https://github.com/mongodb/mongo/commit/bd4653ca22ddeebd4bcdf074eb234a40843f8f3d

Comment by auto [ 27/Aug/13 ]

Author:

{u'username': u'3rf', u'name': u'Kyle Erf', u'email': u'kyle.erf@10gen.com'}

Message: SERVER-9501: initial sync exception: 10083 Changed validation to allow explicit creation of size 0 collections. Should be backported to 2.4.X

Signed-off-by: Matt Kangas <matt.kangas@10gen.com>
Branch: master
https://github.com/mongodb/mongo/commit/f64d0aeb2b6deb9aee857760ac489f6ff3412388

Comment by Puneet Kandhari [ 23/Aug/13 ]

Does this affect empty collections, which have indexes?

Comment by Stennie Steneker (Inactive) [ 28/May/13 ]

Hi Javi,

Apologies for the delay in follow-up.

The problem appears to be with collections that have been created but that do not have any documents yet. These have a size:0 that is triggering the assertion in MongoDB 2.4.3 on initial sync.

You have two such collections listed in the above output:

  • Bauleo_Media_DB.auth_message
  • Bauleo_Media_DB.auth_user_user_permissions

While this is a bug that needs to be addressed, suggested workarounds to try would be to either:

  • insert a dummy document into these collections
  • drop these collections and re-add after initial sync has completed

Regards,
Stephen

Comment by Javi Díaz [ 14/May/13 ]

Hi,

Here you´ve got our output.
Thanks,
Javi

mongos> db.getCollectionNames().forEach( function(name) { printjson(db.getCollection(name).stats())} )
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.auth_group",
	"count" : 1,
	"size" : 44,
	"avgObjSize" : 44,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"name_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.auth_group_permissions",
	"count" : 2,
	"size" : 144,
	"avgObjSize" : 72,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 4,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 32704,
	"indexSizes" : {
		"_id_" : 8176,
		"group_id_1" : 8176,
		"permission_id_1" : 8176,
		"group_id_1_permission_id_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.auth_message",
	"count" : 0,
	"size" : 0,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"user_id_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.auth_permission",
	"count" : 72,
	"size" : 8212,
	"avgObjSize" : 114.05555555555556,
	"storageSize" : 20480,
	"numExtents" : 2,
	"nindexes" : 3,
	"lastExtentSize" : 16384,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 24528,
	"indexSizes" : {
		"_id_" : 8176,
		"content_type_id_1" : 8176,
		"content_type_id_1_codename_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.auth_user",
	"count" : 3,
	"size" : 920,
	"avgObjSize" : 306.6666666666667,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1.209000000000001,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"username_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.auth_user_groups",
	"count" : 1,
	"size" : 68,
	"avgObjSize" : 68,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 4,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 32704,
	"indexSizes" : {
		"_id_" : 8176,
		"user_id_1" : 8176,
		"group_id_1" : 8176,
		"user_id_1_group_id_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.auth_user_user_permissions",
	"count" : 0,
	"size" : 0,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 4,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 32704,
	"indexSizes" : {
		"_id_" : 8176,
		"user_id_1" : 8176,
		"permission_id_1" : 8176,
		"user_id_1_permission_id_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : true,
	"ns" : "Bauleo_Media_DB.bcrawler_blog_entry",
	"count" : 200349,
	"numExtents" : 27,
	"size" : 349909716,
	"storageSize" : 423362560,
	"totalIndexSize" : 39064928,
	"indexSizes" : {
		"_id_" : 7636384,
		"link_1" : 31428544
	},
	"avgObjSize" : 1746.5009358669122,
	"nindexes" : 2,
	"nchunks" : 12,
	"shards" : {
		"shard-a" : {
			"ns" : "Bauleo_Media_DB.bcrawler_blog_entry",
			"count" : 155928,
			"size" : 190931220,
			"avgObjSize" : 1224.483223026012,
			"storageSize" : 224448512,
			"numExtents" : 15,
			"nindexes" : 2,
			"lastExtentSize" : 58564608,
			"paddingFactor" : 1,
			"systemFlags" : 0,
			"userFlags" : 0,
			"totalIndexSize" : 30774464,
			"indexSizes" : {
				"_id_" : 6303696,
				"link_1" : 24470768
			},
			"ok" : 1
		},
		"shard-b" : {
			"ns" : "Bauleo_Media_DB.bcrawler_blog_entry",
			"count" : 44421,
			"size" : 158978496,
			"avgObjSize" : 3578.904031876815,
			"storageSize" : 198914048,
			"numExtents" : 12,
			"nindexes" : 2,
			"lastExtentSize" : 57876480,
			"paddingFactor" : 1,
			"systemFlags" : 0,
			"userFlags" : 0,
			"totalIndexSize" : 8290464,
			"indexSizes" : {
				"_id_" : 1332688,
				"link_1" : 6957776
			},
			"ok" : 1
		}
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.bcrawler_categoria",
	"count" : 12,
	"size" : 1068,
	"avgObjSize" : 89,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 1,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 8176,
	"indexSizes" : {
		"_id_" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.bcrawler_localizacion",
	"count" : 6,
	"size" : 544,
	"avgObjSize" : 90.66666666666667,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"name_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : true,
	"ns" : "Bauleo_Media_DB.bcrawler_noticia",
	"count" : 3373060,
	"numExtents" : 52,
	"size" : 5551481940,
	"storageSize" : 6851395584,
	"totalIndexSize" : 768985504,
	"indexSizes" : {
		"_id_" : 106508752,
		"url_1" : 662476752
	},
	"avgObjSize" : 1645.8295850058996,
	"nindexes" : 2,
	"nchunks" : 156,
	"shards" : {
		"shard-a" : {
			"ns" : "Bauleo_Media_DB.bcrawler_noticia",
			"count" : 1419538,
			"size" : 2249305048,
			"avgObjSize" : 1584.5331706512964,
			"storageSize" : 2694320128,
			"numExtents" : 27,
			"nindexes" : 2,
			"lastExtentSize" : 646242304,
			"paddingFactor" : 1.0000000000025153,
			"systemFlags" : 1,
			"userFlags" : 0,
			"totalIndexSize" : 318626896,
			"indexSizes" : {
				"_id_" : 47191872,
				"url_1" : 271435024
			},
			"ok" : 1
		},
		"shard-b" : {
			"ns" : "Bauleo_Media_DB.bcrawler_noticia",
			"count" : 1953522,
			"size" : 3302176892,
			"avgObjSize" : 1690.370977137703,
			"storageSize" : 4157075456,
			"numExtents" : 25,
			"nindexes" : 2,
			"lastExtentSize" : 1040334848,
			"paddingFactor" : 1.0000000000089646,
			"systemFlags" : 0,
			"userFlags" : 0,
			"totalIndexSize" : 450358608,
			"indexSizes" : {
				"_id_" : 59316880,
				"url_1" : 391041728
			},
			"ok" : 1
		}
	},
	"ok" : 1
}
{
	"sharded" : true,
	"ns" : "Bauleo_Media_DB.bcrawler_podcast",
	"count" : 77949,
	"numExtents" : 18,
	"size" : 67324924,
	"storageSize" : 104812544,
	"totalIndexSize" : 14904848,
	"indexSizes" : {
		"_id_" : 2910656,
		"link_1" : 11994192
	},
	"avgObjSize" : 863.7047813313833,
	"nindexes" : 2,
	"nchunks" : 9,
	"shards" : {
		"shard-a" : {
			"ns" : "Bauleo_Media_DB.bcrawler_podcast",
			"count" : 32232,
			"size" : 20795104,
			"avgObjSize" : 645.1695209729461,
			"storageSize" : 36245504,
			"numExtents" : 9,
			"nindexes" : 2,
			"lastExtentSize" : 12742656,
			"paddingFactor" : 1.0000000000003273,
			"systemFlags" : 1,
			"userFlags" : 0,
			"totalIndexSize" : 6115648,
			"indexSizes" : {
				"_id_" : 1528912,
				"link_1" : 4586736
			},
			"ok" : 1
		},
		"shard-b" : {
			"ns" : "Bauleo_Media_DB.bcrawler_podcast",
			"count" : 45717,
			"size" : 46529820,
			"avgObjSize" : 1017.7793818492027,
			"storageSize" : 68567040,
			"numExtents" : 9,
			"nindexes" : 2,
			"lastExtentSize" : 23224320,
			"paddingFactor" : 1.0000000000004654,
			"systemFlags" : 0,
			"userFlags" : 0,
			"totalIndexSize" : 8789200,
			"indexSizes" : {
				"_id_" : 1381744,
				"link_1" : 7407456
			},
			"ok" : 1
		}
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.bcrawler_sourcerss",
	"count" : 2153,
	"size" : 1628304,
	"avgObjSize" : 756.2954017649791,
	"storageSize" : 4182016,
	"numExtents" : 5,
	"nindexes" : 5,
	"lastExtentSize" : 3145728,
	"paddingFactor" : 1.0000000000001932,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 416976,
	"indexSizes" : {
		"_id_" : 98112,
		"tipo_1" : 65408,
		"location_id_1" : 81760,
		"categoria_id_1" : 81760,
		"location_id_1_tipo_1" : 89936
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.blanguages_language",
	"count" : 2,
	"size" : 112,
	"avgObjSize" : 56,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 3,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 24528,
	"indexSizes" : {
		"_id_" : 8176,
		"name_1" : 8176,
		"code_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : true,
	"ns" : "Bauleo_Media_DB.blanguages_word",
	"count" : 1215526,
	"numExtents" : 25,
	"size" : 86364216,
	"storageSize" : 160968704,
	"totalIndexSize" : 132238624,
	"indexSizes" : {
		"_id_" : 40577488,
		"language_id_1" : 37593248,
		"word_1" : 54067888
	},
	"avgObjSize" : 71.0508997750768,
	"nindexes" : 3,
	"nchunks" : 10,
	"shards" : {
		"shard-a" : {
			"ns" : "Bauleo_Media_DB.blanguages_word",
			"count" : 819629,
			"size" : 57694708,
			"avgObjSize" : 70.39124774745648,
			"storageSize" : 110329856,
			"numExtents" : 15,
			"nindexes" : 3,
			"lastExtentSize" : 21659648,
			"paddingFactor" : 1,
			"systemFlags" : 1,
			"userFlags" : 0,
			"totalIndexSize" : 92388800,
			"indexSizes" : {
				"_id_" : 28992096,
				"word_1" : 37454256,
				"language_id_1" : 25942448
			},
			"ok" : 1
		},
		"shard-b" : {
			"ns" : "Bauleo_Media_DB.blanguages_word",
			"count" : 395897,
			"size" : 28669508,
			"avgObjSize" : 72.41658310116016,
			"storageSize" : 50638848,
			"numExtents" : 10,
			"nindexes" : 3,
			"lastExtentSize" : 17203200,
			"paddingFactor" : 1,
			"systemFlags" : 0,
			"userFlags" : 0,
			"totalIndexSize" : 39849824,
			"indexSizes" : {
				"_id_" : 11585392,
				"word_1" : 16613632,
				"language_id_1" : 11650800
			},
			"ok" : 1
		}
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.developer_app_app_packet",
	"count" : 1,
	"size" : 96,
	"avgObjSize" : 96,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"name_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.developer_app_developer_app",
	"count" : 1,
	"size" : 392,
	"avgObjSize" : 392,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 4,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 32704,
	"indexSizes" : {
		"_id_" : 8176,
		"developer_1" : 8176,
		"packet_id_1" : 8176,
		"website_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.developer_app_ipn_notification",
	"count" : 0,
	"size" : 0,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"invoice_id_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.developer_app_order",
	"count" : 0,
	"size" : 0,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"aplication_id_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.developer_developer",
	"count" : 0,
	"size" : 0,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"user_id_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.django_admin_log",
	"count" : 3075,
	"size" : 875484,
	"avgObjSize" : 284.710243902439,
	"storageSize" : 1396736,
	"numExtents" : 5,
	"nindexes" : 3,
	"lastExtentSize" : 1048576,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 425152,
	"indexSizes" : {
		"_id_" : 114464,
		"user_id_1" : 130816,
		"content_type_id_1" : 179872
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.django_content_type",
	"count" : 24,
	"size" : 2188,
	"avgObjSize" : 91.16666666666667,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"app_label_1_model_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.django_session",
	"count" : 87796,
	"size" : 16778848,
	"avgObjSize" : 191.11175907786233,
	"storageSize" : 30941184,
	"numExtents" : 7,
	"nindexes" : 2,
	"lastExtentSize" : 15572992,
	"paddingFactor" : 1.000000000000096,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 8936368,
	"indexSizes" : {
		"_id_" : 6467216,
		"expire_date_1" : 2469152
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.django_site",
	"count" : 1,
	"size" : 68,
	"avgObjSize" : 68,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 1,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 8176,
	"indexSizes" : {
		"_id_" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.permission_backend_nonrel_grouppermissionlist",
	"count" : 1,
	"size" : 356,
	"avgObjSize" : 356,
	"storageSize" : 8192,
	"numExtents" : 1,
	"nindexes" : 1,
	"lastExtentSize" : 8192,
	"paddingFactor" : 1.57,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 8176,
	"indexSizes" : {
		"_id_" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.permission_backend_nonrel_userpermissionlist",
	"count" : 1,
	"size" : 436,
	"avgObjSize" : 436,
	"storageSize" : 8192,
	"numExtents" : 1,
	"nindexes" : 1,
	"lastExtentSize" : 8192,
	"paddingFactor" : 1.45,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 8176,
	"indexSizes" : {
		"_id_" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.showmedia_showmedia_site",
	"count" : 0,
	"size" : 0,
	"storageSize" : 4096,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 4096,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"ip_address_1" : 8176
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.system.indexes",
	"count" : 67,
	"size" : 7248,
	"avgObjSize" : 108.17910447761194,
	"storageSize" : 40960,
	"numExtents" : 2,
	"nindexes" : 0,
	"lastExtentSize" : 32768,
	"paddingFactor" : 1,
	"systemFlags" : 0,
	"userFlags" : 0,
	"totalIndexSize" : 0,
	"indexSizes" : {
		
	},
	"ok" : 1
}
{
	"sharded" : false,
	"primary" : "shard-a",
	"ns" : "Bauleo_Media_DB.system.users",
	"count" : 1,
	"size" : 100,
	"avgObjSize" : 100,
	"storageSize" : 8192,
	"numExtents" : 1,
	"nindexes" : 2,
	"lastExtentSize" : 8192,
	"paddingFactor" : 1,
	"systemFlags" : 1,
	"userFlags" : 0,
	"totalIndexSize" : 16352,
	"indexSizes" : {
		"_id_" : 8176,
		"user_1_userSource_1" : 8176
	},
	"ok" : 1
}

Comment by Daniel Pasette (Inactive) [ 13/May/13 ]

For each collection in the database "Media_DB" can you get the stats. You can run:

db.getCollectionNames().forEach( function(name) { printjson(db.getCollection(name).stats())} )

Comment by Javi Díaz [ 10/May/13 ]

Hi, have you seen something on this?
Thanks

Comment by Javi Díaz [ 29/Apr/13 ]

Thanks for your soon response, here you have a stacktrace.
As you said, this happens when we start up a replica set to a shard.

Mon Apr 29 19:08:56.826 [rsSync] replSet initial sync cloning db: Media_DB
Mon Apr 29 19:08:56.828 [rsSync] replSet initial sync exception: 10083 create collection invalid size spec 0 attempts remaining
Mon Apr 29 19:08:58.568 [conn28] end connection 10.0.2.2:34448 (9 connections now open)
Mon Apr 29 19:08:58.569 [initandlisten] connection accepted from 10.0.2.2:34801 #30 (10 connections now open)
Mon Apr 29 19:09:15.954 [conn9] command admin.$cmd command:

{ writebacklisten: ObjectId('516fae54aea751da4ddd1b3c') }

ntoreturn:1 keyUpdates:0 reslen:44 300000ms
Mon Apr 29 19:09:16.295 [conn29] end connection 10.0.2.2:34640 (9 connections now open)
Mon Apr 29 19:09:16.297 [initandlisten] connection accepted from 10.0.2.2:35010 #31 (10 connections now open)
Mon Apr 29 19:09:20.258 [conn11] command admin.$cmd command:

{ writebacklisten: ObjectId('516fae473a9dd1c4a42e8e00') }

ntoreturn:1 keyUpdates:0 reslen:44 300000ms
Mon Apr 29 19:09:20.663 [DataFileSync] flushing mmaps took 12309ms for 23 files
Mon Apr 29 19:09:26.829 [rsSync] Fatal Assertion 16233
0xdced21 0xd8eaa3 0xc0325f 0xc1eee1 0xc1fcfd 0xc1ffcc 0xe17679 0x7f315cb21e9a 0x7f315be34cbd
mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xdced21]
mongod(_ZN5mongo13fassertFailedEi+0xa3) [0xd8eaa3]
mongod(_ZN5mongo11ReplSetImpl17syncDoInitialSyncEv+0x6f) [0xc0325f]
mongod(_ZN5mongo11ReplSetImpl11_syncThreadEv+0x71) [0xc1eee1]
mongod(_ZN5mongo11ReplSetImpl10syncThreadEv+0x2d) [0xc1fcfd]
mongod(_ZN5mongo15startSyncThreadEv+0x6c) [0xc1ffcc]
mongod() [0xe17679]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7f315cb21e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f315be34cbd]
Mon Apr 29 19:09:26.831 [rsSync]

***aborting after fassert() failure

Mon Apr 29 19:09:26.832 Got signal: 6 (Aborted).

Mon Apr 29 19:09:26.834 Backtrace:
0xdced21 0x6cf749 0x7f315bd774a0 0x7f315bd77425 0x7f315bd7ab8b 0xd8eade 0xc0325f 0xc1eee1 0xc1fcfd 0xc1ffcc 0xe17679 0x7f315cb21e9a 0x7f315be34cbd
mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xdced21]
mongod(_ZN5mongo10abruptQuitEi+0x399) [0x6cf749]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f315bd774a0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f315bd77425]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f315bd7ab8b]
mongod(_ZN5mongo13fassertFailedEi+0xde) [0xd8eade]
mongod(_ZN5mongo11ReplSetImpl17syncDoInitialSyncEv+0x6f) [0xc0325f]
mongod(_ZN5mongo11ReplSetImpl11_syncThreadEv+0x71) [0xc1eee1]
mongod(_ZN5mongo11ReplSetImpl10syncThreadEv+0x2d) [0xc1fcfd]
mongod(_ZN5mongo15startSyncThreadEv+0x6c) [0xc1ffcc]
mongod() [0xe17679]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7f315cb21e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f315be34cbd]

Comment by Bernie Hackett [ 29/Apr/13 ]

Do you mean you get this exception when you try to add a new replica set member to a shard? Can you post the stacktrace from the mongod log file?

Generated at Thu Feb 08 03:20:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.