Skip to content

Conversation

mongoKart
Copy link
Collaborator

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-37514
Staging - https://preview-mongodbmongokart.gatsbyjs.io/pymongo/docsp-37514-uuid/data-formats/uuid/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice job on a weird page type like this. Left a few suggestions and questions that I think could clean things up a bit. Let me know if you want to discuss formatting or anything like that

Originally, MongoDB represented UUIDs as BSON ``Binary``
values of subtype 3. Because subtype 3 didn't standardize the byte order of UUIDs
during encoding, different MongoDB drivers encoded UUIDs with different byte orders.
Use the tabs below to compare the ways in which different MongoDB language drivers
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.mongodb.com/docs/meta/style-guide/terminology/alphabetical-terms/#std-term-below

Suggested change
Use the tabs below to compare the ways in which different MongoDB language drivers
Use the following tabs to compare the ways in which different MongoDB language drivers


To standardize UUID byte order, we created ``Binary`` subtype 4. Although this subtype
is handled consistently across MongoDB drivers, some MongoDB deployments still contain
UUID values of subtype 3. These legacy UUIDs can result in highly unintuitive behavior,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
UUID values of subtype 3. These legacy UUIDs can result in highly unintuitive behavior,
UUID values of subtype 3. These legacy UUIDs can result in unintuitive behavior,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

UUID values of subtype 3. These legacy UUIDs can result in highly unintuitive behavior,
as shown in the following example.

Example: Applications Share a MongoDB Deployment
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this example is particularly necessary, or if we can just summarize it in a sentence or two at the end of the last paragraph. It feels like a lot to try and follow the different applications and UUID values shown here when IMO the gist of the message is something like "Because different drivers encode UUIDs into different textual representations, finding those values with multiple applications can be unreliable."
Removing this example would also make the page seem less daunting and will get to the main points a bit quicker.

Definitely open to discussing this more if needed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm in favor of almost anything that makes this page shorter

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some context, there were originally two of these example sections (one's now obsolete), which made more sense.

Comment on lines 34 to 35
A Short History of MongoDB UUIDs
--------------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a heading level under Overview since it's mostly giving context to what this page is for

Suggested change
A Short History of MongoDB UUIDs
--------------------------------
A Short History of MongoDB UUIDs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:header-rows: 1

* - UUID Representation
- Default?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this column can be removed. Instead the "unspecified" option could be labeled as unspecified (default) or something similar to that

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also removed heading colons, since it turns out those are against the SG

UUID you're reading from MongoDB was inserted using the ``PYTHON_LEGACY`` representation.
This will be true if the following criteria are met:

- The UUID was inserted by an application using {+driver-short+}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be "using PyMongo versions earlier than v4.0"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so


Use the ``PYTHON_LEGACY`` UUID representation if the
UUID you're reading from MongoDB was inserted using the ``PYTHON_LEGACY`` representation.
This will be true if the following criteria are met:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally interpreted this as only one of the following needing to be met (which I think is incorrect?) Applies to the next sections as well

Suggested change
This will be true if the following criteria are met:
This will be true if both of the following criteria are met:

Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ one fix

Co-authored-by: Jordan Smith <45415425+jordan-smith721@users.noreply.github.com>
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mongoKart mongoKart merged commit 45e13c8 into mongodb:master Apr 22, 2024
@mongoKart mongoKart deleted the docsp-37514-uuid branch April 22, 2024 14:39
mongoKart added a commit to mongoKart/docs-pymongo that referenced this pull request Apr 22, 2024
Co-authored-by: Jordan Smith <45415425+jordan-smith721@users.noreply.github.com>
mongoKart added a commit to mongoKart/docs-pymongo that referenced this pull request Apr 22, 2024
Co-authored-by: Jordan Smith <45415425+jordan-smith721@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants