Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quotes used instead of apostrophes in gridfs spec #1704

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions source/gridfs/gridfs-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ______________________________________________________________________

## Abstract

GridFS is a convention drivers use to store and retrieve BSON binary data (type "x05") that exceeds MongoDB"s
GridFS is a convention drivers use to store and retrieve BSON binary data (type "x05") that exceeds MongoDB's
BSON-document size limit of 16 MiB. When this data, called a **user file**, is written to the system, GridFS divides the
file into **chunks** that are stored as distinct documents in a **chunks collection**. To retrieve a stored file, GridFS
locates and returns all of its component chunks. Internally, GridFS creates a **files collection document** for each
Expand All @@ -30,7 +30,7 @@ The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SH

**Bucket name**

A prefix under which a GridFS system"s collections are stored. Collection names for the files and chunks collections are
A prefix under which a GridFS system's collections are stored. Collection names for the files and chunks collections are
prefixed with the bucket name. The bucket name MUST be configurable by the user. Multiple buckets may exist within a
single database. The default bucket name is "fs".

Expand Down Expand Up @@ -621,25 +621,25 @@ the point at which the application stopped reading won't be detected by the driv
class GridFSBucket {

/**
* Given a @id, delete this stored file"s files collection document and
* Given a @id, delete this stored file's files collection document and
* associated chunks from a GridFS bucket.
*/
void delete(TFileId id);

}
```

Deletes the stored file"s files collection document and associated chunks from the underlying database.
Deletes the stored file's files collection document and associated chunks from the underlying database.

As noted for download(), drivers that previously used id"s of a different type MAY implement a delete() method that
As noted for download(), drivers that previously used id's of a different type MAY implement a delete() method that
accepts that type, but MUST mark that method as deprecated.

**Implementation details:**

There is an inherent race condition between the chunks and files collections. Without some transaction-like behavior
between these two collections, it is always possible for one client to delete a stored file while another client is
attempting a read of the stored file. For example, imagine client A retrieves a stored file"s files collection document,
client B deletes the stored file, then client A attempts to read the stored file"s chunks. Client A wouldn"t find any
attempting a read of the stored file. For example, imagine client A retrieves a stored file's files collection document,
client B deletes the stored file, then client A attempts to read the stored file's chunks. Client A wouldn"t find any
chunks for the given stored file. To minimize the window of vulnerability of reading a stored file that is the process
of being deleted, drivers MUST first delete the files collection document for a stored file, then delete its associated
chunks.
Expand Down Expand Up @@ -798,7 +798,7 @@ return the bytes of the file in `[start, end)`. If "start" and "end" are equal n
If either "start" or "end" is invalid, drivers MUST raise an error. These values are considered invalid if they are
negative, greater than the file length, or if "start" is greater than "end".

When performing partial reads, drivers SHOULD use the file"s "chunkSize" to calculate which chunks contain the desired
When performing partial reads, drivers SHOULD use the file's "chunkSize" to calculate which chunks contain the desired
section and avoid reading unneeded documents from the "chunks" collection.

### Renaming stored files
Expand All @@ -814,7 +814,7 @@ class GridFSBucket {
}
```

Sets the filename field in the stored file"s files collection document to the new filename.
Sets the filename field in the stored file's files collection document to the new filename.

**Implementation details:**

Expand Down
Loading