@@ -7,7 +7,7 @@ ______________________________________________________________________
7
7
8
8
## Abstract
9
9
10
- GridFS is a convention drivers use to store and retrieve BSON binary data (type "x05") that exceeds MongoDB" s
10
+ GridFS is a convention drivers use to store and retrieve BSON binary data (type "x05") that exceeds MongoDB' s
11
11
BSON-document size limit of 16 MiB. When this data, called a ** user file** , is written to the system, GridFS divides the
12
12
file into ** chunks** that are stored as distinct documents in a ** chunks collection** . To retrieve a stored file, GridFS
13
13
locates and returns all of its component chunks. Internally, GridFS creates a ** files collection document** for each
@@ -30,7 +30,7 @@ The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SH
30
30
31
31
** Bucket name**
32
32
33
- A prefix under which a GridFS system" s collections are stored. Collection names for the files and chunks collections are
33
+ A prefix under which a GridFS system' s collections are stored. Collection names for the files and chunks collections are
34
34
prefixed with the bucket name. The bucket name MUST be configurable by the user. Multiple buckets may exist within a
35
35
single database. The default bucket name is "fs".
36
36
@@ -621,25 +621,25 @@ the point at which the application stopped reading won't be detected by the driv
621
621
class GridFSBucket {
622
622
623
623
/**
624
- * Given a @id, delete this stored file" s files collection document and
624
+ * Given a @id, delete this stored file' s files collection document and
625
625
* associated chunks from a GridFS bucket.
626
626
*/
627
627
void delete (TFileId id);
628
628
629
629
}
630
630
```
631
631
632
- Deletes the stored file" s files collection document and associated chunks from the underlying database.
632
+ Deletes the stored file' s files collection document and associated chunks from the underlying database.
633
633
634
- As noted for download(), drivers that previously used id" s of a different type MAY implement a delete() method that
634
+ As noted for download(), drivers that previously used id' s of a different type MAY implement a delete() method that
635
635
accepts that type, but MUST mark that method as deprecated.
636
636
637
637
** Implementation details:**
638
638
639
639
There is an inherent race condition between the chunks and files collections. Without some transaction-like behavior
640
640
between these two collections, it is always possible for one client to delete a stored file while another client is
641
- attempting a read of the stored file. For example, imagine client A retrieves a stored file" s files collection document,
642
- client B deletes the stored file, then client A attempts to read the stored file" s chunks. Client A wouldn"t find any
641
+ attempting a read of the stored file. For example, imagine client A retrieves a stored file' s files collection document,
642
+ client B deletes the stored file, then client A attempts to read the stored file' s chunks. Client A wouldn"t find any
643
643
chunks for the given stored file. To minimize the window of vulnerability of reading a stored file that is the process
644
644
of being deleted, drivers MUST first delete the files collection document for a stored file, then delete its associated
645
645
chunks.
@@ -798,7 +798,7 @@ return the bytes of the file in `[start, end)`. If "start" and "end" are equal n
798
798
If either "start" or "end" is invalid, drivers MUST raise an error. These values are considered invalid if they are
799
799
negative, greater than the file length, or if "start" is greater than "end".
800
800
801
- When performing partial reads, drivers SHOULD use the file" s "chunkSize" to calculate which chunks contain the desired
801
+ When performing partial reads, drivers SHOULD use the file' s "chunkSize" to calculate which chunks contain the desired
802
802
section and avoid reading unneeded documents from the "chunks" collection.
803
803
804
804
### Renaming stored files
@@ -814,7 +814,7 @@ class GridFSBucket {
814
814
}
815
815
```
816
816
817
- Sets the filename field in the stored file" s files collection document to the new filename.
817
+ Sets the filename field in the stored file' s files collection document to the new filename.
818
818
819
819
** Implementation details:**
820
820
0 commit comments