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

Added description of failure scenarios when code uses databases and brokers together #3609

Merged
merged 8 commits into from
Sep 19, 2022

Conversation

udidahan
Copy link
Contributor

@udidahan udidahan commented Sep 4, 2022

When developers are building mission-critical systems, they need to be aware of the various failure scenarios and how to handle them.

This PR gives them one detailed example and points them at resources that explain the topic further.

@prmerger-automator
Copy link
Contributor

@udidahan : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@udidahan
Copy link
Contributor Author

udidahan commented Sep 4, 2022

@EdPrice-MSFT is this more the kind of thing you had in mind? Thanks!

@Jak-MS
Copy link
Contributor

Jak-MS commented Sep 6, 2022

@msimecek

  • Can you review this PR?

IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.

cc: @EdPrice-MSFT

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged Tracking label for the PR review team label Sep 6, 2022
Copy link
Contributor

@msimecek msimecek left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! A couple of comments from me.

- One common technique of making message handling idempotent is to check some persistent store, like a database, if the message has already been processed, and if so, not running the logic to process it again.
- However, if the processing of the message includes database operations, specifically the insertion of new records with database-generated identifiers, as well as the emitting of new messages to the broker containing those identifiers, because there aren't distributed transactions which encompass both the database and the message broker, there can be a number of complications that can occur if the process running the code happens to fail, for example:
- If the code emitting the messages runs before the database transaction is committed, which is how many developers work using the Unit of Work pattern, those messages can "escape" if the failure occurs between calling the broker and asking that the database transaction be committed. As the transaction rolls back, those database-generated IDs are also undone, leaving them available to other code which may be running at the same time. This can cause recipients of the "escaped" messages to processes the wrong database entries, hurting the overall consistency and correctness of your system.
- For a deeper discussion on these failure scenarios and how to handle them, see [this webinar on the topic](https://particular.net/webinars/implementing-an-outbox).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- For a deeper discussion on these failure scenarios and how to handle them, see [this webinar on the topic](https://particular.net/webinars/implementing-an-outbox).

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this. A link to your company's webinar, promoting your product, is not part of Azure Mission-critical guidance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Ed-Price
Copy link
Contributor

Ed-Price commented Sep 8, 2022

@EdPrice-MSFT is this more the kind of thing you had in mind? Thanks!

I was thinking more like having you create a new architecture, like a Solution Idea, which shows how Azure services work with your company's solutions.

Regarding this PR...

See feedback from @msimecek. Thanks, Martin!

@ckittel ckittel marked this pull request as draft September 9, 2022 13:56
@ckittel
Copy link
Member

ckittel commented Sep 13, 2022

@udidahan do you plan on continuing this PR and following up with the suggestions from the current doc co-owner, @msimecek?

@prmerger-automator
Copy link
Contributor

@udidahan : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@opbld31
Copy link

opbld31 commented Sep 16, 2022

Docs Build status updates of commit 6c9acd3:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/reference-architectures/containers/aks-mission-critical/mission-critical-data-platform.md ⚠️Warning Details

docs/reference-architectures/containers/aks-mission-critical/mission-critical-data-platform.md

  • Line 165, Column 59: [Warning: hard-coded-locale - See documentation] Link 'https://docs.microsoft.com/en-us/azure/architecture/best-practices/transactional-outbox-cosmos' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 165, Column 59: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://docs.microsoft.com/en-us/azure/architecture/best-practices/transactional-outbox-cosmos' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@prmerger-automator
Copy link
Contributor

@udidahan : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@opbld30
Copy link

opbld30 commented Sep 16, 2022

Docs Build status updates of commit 17f0044:

✅ Validation status: passed

File Status Preview URL Details
docs/reference-architectures/containers/aks-mission-critical/mission-critical-data-platform.md ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@prmerger-automator
Copy link
Contributor

@udidahan : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@opbld32
Copy link

opbld32 commented Sep 16, 2022

Docs Build status updates of commit 0349a10:

✅ Validation status: passed

File Status Preview URL Details
docs/reference-architectures/containers/aks-mission-critical/mission-critical-data-platform.md ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@udidahan
Copy link
Contributor Author

I hope these changes address all the concerns raised. Thanks.

@udidahan udidahan marked this pull request as ready for review September 16, 2022 16:31
@prmerger-automator
Copy link
Contributor

@udidahan : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@opbld30
Copy link

opbld30 commented Sep 19, 2022

Docs Build status updates of commit 5152ded:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

…ission-critical-data-platform.md

Co-authored-by: Martin Simecek <[email protected]>
@prmerger-automator
Copy link
Contributor

@udidahan : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@opbld31
Copy link

opbld31 commented Sep 19, 2022

Docs Build status updates of commit 1c9e4fb:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@udidahan
Copy link
Contributor Author

Changes incorporated 👍🏼

@prmerger-automator
Copy link
Contributor

@ckittel : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@opbld31
Copy link

opbld31 commented Sep 19, 2022

Docs Build status updates of commit bcb5a07:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@ckittel
Copy link
Member

ckittel commented Sep 19, 2022

Added a commit just to see if I can get the build to kick off again (might have an upstream problem here)

@ckittel
Copy link
Member

ckittel commented Sep 19, 2022

Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

@udidahan -- looks like our build process is currently being temperamental. Nothing for you to address here, we'll keep trying.

@udidahan
Copy link
Contributor Author

Thanks for letting me know. I was a bit worried 😅

Ed-Price
Ed-Price previously approved these changes Sep 19, 2022
Copy link
Contributor

@Ed-Price Ed-Price left a comment

Choose a reason for hiding this comment

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

Finished edit. Looks great!

Let's lead the RFC quote to set it up better. Finished edit pass.
@prmerger-automator
Copy link
Contributor

@EdPrice-MSFT : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@opbld33
Copy link

opbld33 commented Sep 19, 2022

Docs Build status updates of commit edb5dee:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@Ed-Price
Copy link
Contributor

I created an incident to resolve the build error: https://portal.microsofticm.com/imp/v3/incidents/details/336037212/home

Copy link
Contributor

@Ed-Price Ed-Price left a comment

Choose a reason for hiding this comment

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

Made an edit pass. Please review.

Looks great!

@Ed-Price
Copy link
Contributor

#Sign-Off

@prmerger-automator
Copy link
Contributor

Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @msimecek

@Jak-MS Jak-MS closed this Sep 19, 2022
@Jak-MS Jak-MS reopened this Sep 19, 2022
@opbld33
Copy link

opbld33 commented Sep 19, 2022

Docs Build status updates of commit edb5dee:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@Jak-MS Jak-MS merged commit 25f1b9a into MicrosoftDocs:main Sep 19, 2022
@udidahan
Copy link
Contributor Author

Thanks everyone for helping get this across the finish line.

BTW, how long does it usually take for these merges to make their way to the public site? The reason I ask is that I don't see the changes on the public site:

https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/containers/aks-mission-critical/mission-critical-data-platform#every-message-must-be-processed

@udidahan
Copy link
Contributor Author

OK. I see that it's live now. Thank you all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants