@@ -37,95 +37,102 @@ Collections
37
37
The :data:`changelog` collection stores a document for each change to
38
38
the metadata of a sharded collection.
39
39
40
- Each document contains the following fields:
41
-
42
- .. data:: changeID
43
-
44
- hostname-time-increment
45
-
46
- .. data:: server
40
+ .. example::
41
+
42
+ The following example displays a single record of a chunk split
43
+ from a :data:`config.changelog <changelog>`` collection:
44
+
45
+ .. code-block:: javascript
46
+
47
+ {
48
+ "_id" : "d.local-2012-12-11T14:09:21-0",
49
+ "server" : "<hostanme>:<port>",
50
+ "clientAddr" : "127.0.0.1:63381",
51
+ "time" : ISODate("2012-12-11T14:09:21.039Z"),
52
+ "what" : "split",
53
+ "ns" : "<database>.<collection>",
54
+ "details" : {
55
+ "before" : {
56
+ "min" : {
57
+ "<database>" : { $minKey : 1 }
58
+ },
59
+ "max" : {
60
+ "<database>" : { $maxKey : 1 }
61
+ },
62
+ "lastmod" : Timestamp(1000, 0),
63
+ "lastmodEpoch" : ObjectId("000000000000000000000000")
64
+ },
65
+ "left" : {
66
+ "min" : {
67
+ "<database>" : { $minKey : 1 }
68
+ },
69
+ "max" : {
70
+ "<database>" : "<value>"
71
+ },
72
+ "lastmod" : Timestamp(1000, 1),
73
+ "lastmodEpoch" : ObjectId("50c73e0bca6554d8d3b19a83")
74
+ },
75
+ "right" : {
76
+ "min" : {
77
+ "<database>" : "<value>"
78
+ },
79
+ "max" : {
80
+ "<database>" : { $maxKey : 1 }
81
+ },
82
+ "lastmod" : Timestamp(1000, 2),
83
+ "lastmodEpoch" : ObjectId("50c73e0bca6554d8d3b19a83")
84
+ }
85
+ }
86
+ }
47
87
48
- hostname
88
+ Each document in the :data:`changelog` collection contains the
89
+ following fields:
49
90
50
- .. data:: clientAddr
91
+ .. What? commenting out because the description isn't clear and it
92
+ doesn't appear in the example above.
51
93
52
- hostname:port of client causing change
94
+ .. data:: changelog.changeID
53
95
54
- .. data:: time
96
+ hostname- time-increment
55
97
56
- time change occurred
98
+ .. data:: changelog.server
57
99
58
- .. data:: what
100
+ The hostname of the server that holds this data.
59
101
60
- Type of change:
102
+ .. FACTCHECK above.
61
103
62
- * dropCollection
63
- * dropCollection.start
64
- * dropDatabase
65
- * dropDatabase.start
66
- * moveChunk.start
67
- * moveChunk.commit
68
- * split
69
- * multi-split
104
+ .. data:: changelog.clientAddr
70
105
71
- .. data:: ns
106
+ A string that holds the address of the client, a
107
+ :program:`mongos` instance that initiates this change.
72
108
73
- Namespace change affected.
109
+ .. data:: changelog.time
74
110
75
- .. data:: details
111
+ A :term:`ISODate` timestamp that reflects when the change
112
+ occurred.
76
113
77
- A BSON document of additional details, the contents vary
78
- depending on the type of the change.
114
+ .. data:: changelog.what
79
115
116
+ Reflects the type of change recorded. Possible values are:
80
117
81
- .. example::
118
+ - ``dropCollection``
119
+ - ``dropCollection.start``
120
+ - ``dropDatabase``
121
+ - ``dropDatabase.start``
122
+ - ``moveChunk.start``
123
+ - ``moveChunk.commit``
124
+ - ``split``
125
+ - ``multi-split``
82
126
83
- The following example displays a single record of a chunk split
84
- from a ``config.changelog`` collection:
127
+ .. data:: changelog.ns
85
128
86
- .. code-block:: javascript
129
+ Namespace where the change occured.
87
130
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
- }
131
+ .. data:: changelog.details
128
132
133
+ A :term:`document` that contains additional details regarding
134
+ the change. The structure of the :data:`~changelog.details`
135
+ document depends on the type of change.
129
136
130
137
.. data:: chunks
131
138
0 commit comments