Skip to content

DOCSP-47041: Causal consistency #623

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

Merged
merged 8 commits into from
Feb 28, 2025

Conversation

norareidy
Copy link
Contributor

@norareidy norareidy commented Feb 24, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-47041

Staging Links

  • crud/transactions
  • 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

    netlify bot commented Feb 24, 2025

    Deploy Preview for docs-java ready!

    Name Link
    🔨 Latest commit 22f79b4
    🔍 Latest deploy log https://app.netlify.com/sites/docs-java/deploys/67c1ddfcbae7e400081fae31
    😎 Deploy Preview https://deploy-preview-623--docs-java.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    Copy link
    Contributor

    @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.

    Just a few small suggestions

    Comment on lines 82 to 83
    - The driver runs write operations that logically must precede other write operations
    before these dependent writes.
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    This was a little confusing to me. Would it make sense to simplify it to something like this?

    Suggested change
    - The driver runs write operations that logically must precede other write operations
    before these dependent writes.
    - The driver runs write operations before first when they logically must precede other write operations.

    An example might help make this more clear as well

    Comment on lines 86 to 87
    - The driver runs write operations that logically must follow other read operations
    after these reads.
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Similar to the above, could this be simplified and/or have an example added?

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    I reworded and added an example, let me know what you think!


    MongoDB enables **causal consistency** in client sessions.
    The causal consistency model guarantees that operations within a session
    run in a causal order. Additionally, clients observe results that
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    nit: Not sure that "additionally" is necessary here

    Suggested change
    run in a causal order. Additionally, clients observe results that
    run in a causal order. Clients observe results that

    Comment on lines 60 to 62
    operations. If you perform a series of operations where one operation
    logically depends on the result of another, any subsequent
    reads reflect the dependent relationship.
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    S: Clarify that this is giving an example of the preceding descriptions

    Suggested change
    operations. If you perform a series of operations where one operation
    logically depends on the result of another, any subsequent
    reads reflect the dependent relationship.
    operations. For example, if you perform a series of operations where one operation
    logically depends on the result of another, any subsequent
    reads reflect the dependent relationship.

    Copy link
    Contributor

    @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!

    @norareidy norareidy marked this pull request as ready for review February 25, 2025 16:56
    @norareidy norareidy requested a review from a team as a code owner February 25, 2025 16:56
    @norareidy norareidy requested review from katcharov and removed request for a team February 25, 2025 16:56
    @norareidy
    Copy link
    Contributor Author

    @stIncMale this PR doesn't need a tech review; it includes information that applies to all drivers and uses the same copy approved by a Python engineer for PyMongo.

    @norareidy norareidy removed the request for review from stIncMale February 28, 2025 16:15
    @norareidy norareidy merged commit d9b266f into mongodb:master Feb 28, 2025
    6 checks passed
    @norareidy norareidy deleted the DOCSP-47041-causal-consistency branch February 28, 2025 16:17
    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.

    2 participants