Promising and optimistic: prevent assistants from covering what others have just modified

The assistant reads the document and is generated and checked. By the time the changes are submitted, another editor may have updated the same document.

• Step by stepCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives 2 first fixes

Try to do it after reading

  • Explanatory optimism: mechanisms and prerequisites to prevent assistants from covering newly modified content
  • Positioning the mechanism ' s fault limits with fixed examples

Suggested first

  • Resource Version
  • Conditions Update

Issues and mechanisms

The assistant reads the document and is generated and checked. By the time the changes are submitted, another editor may have updated the same document. Optimism and control of submission of version terms when read; If the condition is no longer valid, the old writing is rejected, and the difference is read and judged. It addresses the issue of lost updates and does not decide for the system how to merge content.

Take the interface with the entity label as an example, read the returned version identifier and write using If-Match to indicate that only the specified version is accepted. The service end comparison must be performed and written to operate atoms; There is still a competition for the client to check and write again. The strong-test semantic and specific error response in the HTTP condition request should be reconciled with the interface. The Quantium key is responsible for the repetitive effect of the same request and the version condition is responsible for conflicts between different requests, which cannot be substituted for each other.

A concrete example

Both A and B read version 7. The first amendments were submitted and the service end turned the resources into version VIII. B was subsequently submitted with version VII. The conditions should have failed to cover the A update. The re-reading of B found that A modified the test conclusion and that both the original candidate and the examination results required reassessment; To replace only seven of the requests by eight would circumvent the purpose of conflict protection. If both editors are completely independent, the merger candidate should also be constructed and re-examined in the new version.

Borders and checks

Version markings must be maintained by credible services and cannot be produced at will by models. The long-term process also records which executive summaries and versions of the approvals are intended for, and old approvals do not necessarily continue to be valid in the aftermath of a conflict. Nor does the update prevent error of authority, malicious modification or omission of business constraints, which need to be verified simultaneously at the service end; The agreement supports the condition field without implying that it is actually used by all interfaces.

Check understanding

Can the same type of key prevent different editors from covering each other?

There's no guarantee. It usually repeats the same logical request; Different editorial requests still require versions of conditions or segregation of services to deal with competition.

Is it safe to automatically replace the latest version after the condition fails?

Not safe. That would be tantamount to removing the original premise, which would have to be read, compared and examined for new amendments.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. RFC 9110 — HTTP Semantics, If-Match
  2. AWS Builders Library — Making retries safe with idempotent APIs

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.