@@ -32,6 +32,101 @@ Collections
3232.. if we add a collection to the config database here, also update the
3333 list on the sharding-internals page.
3434
35+ .. data:: changelog
36+
37+ The :data:`changelog` collection stores a document for each change to
38+ the metadata of a sharded collection.
39+
40+ Each document contains the following fields:
41+
42+ .. data:: changeID
43+
44+ hostname-time-increment
45+
46+ .. data:: server
47+
48+ hostname
49+
50+ .. data:: clientAddr
51+
52+ hostname:port of client causing change
53+
54+ .. data:: time
55+
56+ time change occurred
57+
58+ .. data:: what
59+
60+ Type of change:
61+
62+ * dropCollection
63+ * dropCollection.start
64+ * dropDatabase
65+ * dropDatabase.start
66+ * moveChunk.start
67+ * moveChunk.commit
68+ * split
69+ * multi-split
70+
71+ .. data:: ns
72+
73+ Namespace change affected.
74+
75+ .. data:: details
76+
77+ A BSON document of additional details, the contents vary
78+ depending on the type of the change.
79+
80+
81+ .. example::
82+
83+ The following example displays a single record of a chunk split
84+ from a ``config.changelog`` collection:
85+
86+ .. code-block:: javascript
87+
88+ {
89+ "_id" : "d.local-2012-12-11T14:09:21-0",
90+ "server" : "d.local",
91+ "clientAddr" : "127.0.0.1:63381",
92+ "time" : ISODate("2012-12-11T14:09:21.039Z"),
93+ "what" : "split",
94+ "ns" : "snps.elegans",
95+ "details" : {
96+ "before" : {
97+ "min" : {
98+ "snp" : { $minKey : 1 }
99+ },
100+ "max" : {
101+ "snp" : { $maxKey : 1 }
102+ },
103+ "lastmod" : Timestamp(1000, 0),
104+ "lastmodEpoch" : ObjectId("000000000000000000000000")
105+ },
106+ "left" : {
107+ "min" : {
108+ "snp" : { $minKey : 1 }
109+ },
110+ "max" : {
111+ "snp" : "haw54524"
112+ },
113+ "lastmod" : Timestamp(1000, 1),
114+ "lastmodEpoch" : ObjectId("50c73e0bca6554d8d3b19a83")
115+ },
116+ "right" : {
117+ "min" : {
118+ "snp" : "haw54524"
119+ },
120+ "max" : {
121+ "snp" : { $maxKey : 1 }
122+ },
123+ "lastmod" : Timestamp(1000, 2),
124+ "lastmodEpoch" : ObjectId("50c73e0bca6554d8d3b19a83")
125+ }
126+ }
127+ }
128+
129+
35130.. data:: chunks
36131
37132 The :data:`chunks` collection stores a document for each chunk in
@@ -187,7 +282,7 @@ Collections
187282 mongos> db.getCollection("version").find()
188283 { "_id" : 1, "version" : 3 }
189284
190- .. note::
285+ .. note::
191286
192287 Like all databases in MongoDB, the ``config`` database contains a
193288 :data:`system.indexes` collection contains metadata for all indexes
0 commit comments