Skip to content

Commit 28dad16

Browse files
committed
CDRIVER-852 document that gridfs timeout is unused
1 parent 4f6ee21 commit 28dad16

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

doc/mongoc_gridfs_file_readv.page

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ mongoc_gridfs_file_readv (mongoc_gridfs_file_t *file,
2929
<tr><td><p>iov</p></td><td><p>An array of <code xref="mongoc_iovec_t">mongoc_iovec_t</code>.</p></td></tr>
3030
<tr><td><p>iovcnt</p></td><td><p>The number of elements in <code>iov</code>.</p></td></tr>
3131
<tr><td><p>min_bytes</p></td><td><p>The minimum number of bytes that must be read or an error will be synthesized.</p></td></tr>
32-
<tr><td><p>timeout_msec</p></td><td><p>A uint32_t with the timeout in milliseconds.</p></td></tr>
32+
<tr><td><p>timeout_msec</p></td><td><p>Unused.</p></td></tr>
3333
</table>
3434
</section>
3535

3636
<section id="description">
3737
<title>Description</title>
3838
<p>This function performs a scattered read from <code>file</code>, potentially blocking to read from the MongoDB server.</p>
39-
<p>Timeout should be the number of milliseconds to allow blocking, or 0 to disallow blocking.</p>
39+
<p>The <code>timeout_msec</code> parameter is unused.</p>
4040
</section>
4141

4242
<section id="return">

doc/mongoc_gridfs_file_writev.page

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ mongoc_gridfs_file_writev (mongoc_gridfs_file_t *file,
2626
<tr><td><p>file</p></td><td><p>A <code xref="mongoc_gridfs_file_t">mongoc_gridfs_file_t</code>.</p></td></tr>
2727
<tr><td><p>iov</p></td><td><p>An array of <code xref="mongoc_iovec_t">mongoc_iovec_t</code>.</p></td></tr>
2828
<tr><td><p>iovcnt</p></td><td><p>The number of elements in <code>iov</code>.</p></td></tr>
29-
<tr><td><p>timeout_msec</p></td><td><p>A uint32_t with the timeout in milliseconds.</p></td></tr>
29+
<tr><td><p>timeout_msec</p></td><td><p>Unused.</p></td></tr>
3030
</table>
3131
</section>
3232

3333
<section id="description">
3434
<title>Description</title>
3535
<p>Performs a gathered write to the underlying gridfs file.</p>
36-
<p>If timeout is reached, then -1 is returned and errno is set to ETIMEDOUT.</p>
36+
<p>The <code>timeout_msec</code> parameter is unused.</p>
3737
</section>
3838

3939
<section id="return">

src/mongoc/mongoc-gridfs-file.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ mongoc_gridfs_file_destroy (mongoc_gridfs_file_t *file)
419419
}
420420

421421

422-
/** readv against a gridfs file */
422+
/** readv against a gridfs file
423+
* timeout_msec is unused */
423424
ssize_t
424425
mongoc_gridfs_file_readv (mongoc_gridfs_file_t *file,
425426
mongoc_iovec_t *iov,
@@ -437,9 +438,6 @@ mongoc_gridfs_file_readv (mongoc_gridfs_file_t *file,
437438
BSON_ASSERT (file);
438439
BSON_ASSERT (iov);
439440
BSON_ASSERT (iovcnt);
440-
BSON_ASSERT (timeout_msec <= INT_MAX);
441-
442-
/* TODO: we should probably do something about timeout_msec here */
443441

444442
/* Reading when positioned past the end does nothing */
445443
if (file->pos >= file->length) {
@@ -484,7 +482,8 @@ mongoc_gridfs_file_readv (mongoc_gridfs_file_t *file,
484482
}
485483

486484

487-
/** writev against a gridfs file */
485+
/** writev against a gridfs file
486+
* timeout_msec is unused */
488487
ssize_t
489488
mongoc_gridfs_file_writev (mongoc_gridfs_file_t *file,
490489
mongoc_iovec_t *iov,
@@ -501,9 +500,6 @@ mongoc_gridfs_file_writev (mongoc_gridfs_file_t *file,
501500
BSON_ASSERT (file);
502501
BSON_ASSERT (iov);
503502
BSON_ASSERT (iovcnt);
504-
BSON_ASSERT (timeout_msec <= INT_MAX);
505-
506-
/* TODO: we should probably do something about timeout_msec here */
507503

508504
/* Pull in the correct page */
509505
if (!file->page && !_mongoc_gridfs_file_refresh_page (file)) {

0 commit comments

Comments
 (0)