Skip to content

[Docs] Add documentation for LRO (Long Running Operations)#48180

Draft
JackTn wants to merge 1 commit intoAzure:mainfrom
JackTn:jacktn/add-lro-behavior-docs
Draft

[Docs] Add documentation for LRO (Long Running Operations)#48180
JackTn wants to merge 1 commit intoAzure:mainfrom
JackTn:jacktn/add-lro-behavior-docs

Conversation

@JackTn
Copy link
Member

@JackTn JackTn commented Mar 2, 2026

This pull request adds a comprehensive documentation file summarizing the definition, usage, and common pitfalls of Long-Running Operations (LROs) in generated Azure Java SDKs. The document clarifies the distinction between service-side LROs and client-side async I/O, outlines how Java SDKs model LROs, and highlights real-world issues encountered by developers.

Documentation improvements:

  • Added a new file doc/dev/java-sdk-lro.md that explains what LROs are, how Java SDKs implement them (including usage of SyncPoller and PollerFlux), and the difference between service async and client async operations.
  • Included common conventions and pitfalls, such as method naming, sync-over-async usage, and challenges with terminal result types and response shapes.

Real-world troubleshooting and references:

  • Documented two recurring issues from Teams discussions: difficulties with final LRO response deserialization and lack of default support for poller rehydration using only an operation ID.
  • Provided direct links to relevant Teams threads and further reading for deeper understanding.


This section captures two recurring issues in Java LRO discussions:

1) Final LRO response shape and deserialization
Copy link
Member

@haolingdong-msft haolingdong-msft Mar 2, 2026

Choose a reason for hiding this comment

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

add link to the teams case question?
is it in 4.1 and 4.2?


## 1. Definitions

### 1.1 What an LRO is (service async)
Copy link
Member

Choose a reason for hiding this comment

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

this two definitions are a bit hard to understand for me. could you elaborate more on it?
I'm thinking if we could extract definition from official documents:

Below are LRO related documents.
Data plane:
Rest api guidelines: api-guidelines/azure/Guidelines.md at vNext · microsoft/api-guidelines
Service behavior (step by step flow): api-guidelines/azure/ConsiderationsForServiceDesign.md at vNext · microsoft/api-guidelines
TypeSpec Authoring: 6. Defining long-running resource operations | TypeSpec Azure Deep Dive: Long-running (Asynchronous) Operations | TypeSpec Azure

Management plane:
Rest api guidelines: resource-provider-contract/v1.0/async-api-reference.md at master · cloud-and-ai-microsoft/resource-provider-contract
TypeSpec Authoring: ARM Resource Operations | TypeSpec Azure

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