@@ -88,7 +88,7 @@ Diagnostic Commands
88
88
89
89
* - :manual:`buildInfo </reference/command/buildInfo>`
90
90
91
- - The response returns the following fields:
91
+ - The response contains the following fields:
92
92
93
93
**ok**
94
94
Returns ``1`` for success or ``0`` for failure.
@@ -132,7 +132,7 @@ Diagnostic Commands
132
132
133
133
* - :manual:`collStats </reference/command/collStats>`
134
134
135
- - The following fields are omitted from the response:
135
+ - The command omits the following fields in the response:
136
136
137
137
* ``avgObjSize``
138
138
* ``capped``
@@ -143,9 +143,10 @@ Diagnostic Commands
143
143
* ``totalIndexSize``
144
144
* ``indexSizes``
145
145
146
- The following fields are added to the response. You can use
147
- these fields to verify what partitions are being used to
148
- populate a collection.
146
+ The command adds the following fields in the response. You can
147
+ use these fields to verify what partitions are being used to
148
+ populate a collection and understand how recently the stats were
149
+ computed.
149
150
150
151
**partitions.format**
151
152
The file format of the partition.
@@ -169,22 +170,38 @@ Diagnostic Commands
169
170
**avgPartitionSize**
170
171
The average size of all partitions.
171
172
173
+ **cacheMetadata**
174
+ Contains information on how recently the stats were computed.
175
+
176
+ **cacheMetadata.computeTime**
177
+ The time in :manual:`ISODate
178
+ </reference/glossary/#term-isodate>` format when the
179
+ computation for the stats started.
180
+
181
+ **cacheMetadata.automaticRefreshInProgress**
182
+ The flag that indicates if a background job is running now to
183
+ refresh the cache.
184
+
172
185
.. example::
173
186
174
187
.. code-block:: json
175
188
176
189
{
177
190
...
191
+ "partitionCount": <number of partitions>,
192
+ "avgPartitionSize": <average size of all partitions>,
178
193
"partitions": [{
179
194
"format": <file format>,
180
195
"attributes": <filtering attributes>,
181
196
"count": <number of documents in partition>,
182
197
"source": <S3 url or Atlas cluster name>,
183
198
"size": <size, in bytes, of the partition>
184
199
}, ...],
185
- "partitionCount": <number of partitions>,
186
- "avgPartitionSize": <average size of all partitions>
187
- ...
200
+ "cacheMetadata": {
201
+ computeTime: ISODate("2021-07-25T15:10:33.513Z"),
202
+ automaticRefreshInProgress: false
203
+ },
204
+ ...
188
205
}
189
206
190
207
{+adl+} introduces an optional boolean parameter, ``sync``, to
@@ -217,14 +234,7 @@ Diagnostic Commands
217
234
218
235
* - :manual:`dbStats </reference/command/dbStats>`
219
236
220
- - The following fields are omitted from the response:
221
-
222
- * ``object``
223
- * ``avgObjSize``
224
- * ``fsUsedSize``
225
- * ``fsTotalSize``
226
-
227
- {+adl+} introduces an optional boolean parameter, ``sync``, to
237
+ - {+adl+} introduces an optional boolean parameter, ``sync``, to
228
238
bypass the cache and fetch the most recent storage statistics
229
239
for a given database. The following values are valid for the
230
240
``sync`` parameter:
@@ -244,6 +254,29 @@ Diagnostic Commands
244
254
To learn more about the parameters supported by this
245
255
command, see :manual:`dbStats </reference/command/dbStats>`.
246
256
257
+ The command omits the followig fields in the response:
258
+
259
+ * ``object``
260
+ * ``avgObjSize``
261
+ * ``fsUsedSize``
262
+ * ``fsTotalSize``
263
+
264
+ The commands adds the following fields in the response. You can
265
+ use these fields to determine whether the command returned
266
+ stale data.
267
+
268
+ **cacheMetadata**
269
+ Contains information on how recently the stats were computed.
270
+
271
+ **cacheMetadata.computeTime**
272
+ The time in :manual:`ISODate
273
+ </reference/glossary/#term-isodate>` format when the
274
+ computation for the stats started.
275
+
276
+ **cacheMetadata.automaticRefreshInProgress**
277
+ The flag that indicates if a background job is running now to
278
+ refresh the cache.
279
+
247
280
* - :manual:`explain </reference/command/explain>`
248
281
249
282
- The data returned by ``explain`` documents the |data-lake| query
0 commit comments