Use this when changes must all succeed or all fail.
Transaction
A transaction groups changes so they all succeed or all fail together, such as a database transaction or NETCONF candidate commit, avoiding half-applied changes.
1. Transactions apply all-or-nothing.
2. Use where available (NETCONF candidate, DB transactions, configure replace).
3. Many systems aren't transactional — design compensations.
4. Confirmed commits protect access.
5. Know the limits.
begin → changes → commit (or rollback)
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Assuming APIs are transactional when they are not.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- A transaction applies all changes or none.
- Examples: database transactions, NETCONF candidate commit.
- Not every system supports transactions.
- NETCONF candidate + commit / commit confirmed — transactional config
- Database transactions — atomicity
- Terraform plan/apply (not transactional across resources) — awareness
ReferenceWhy it matters1 section · depth on demand
What it is
A transaction applies several changes as one unit: all succeed or none (NETCONF candidate+commit, database transactions, Junos commit).
ReferenceImportant terms & boundaries2 sections · depth on demand
Example
Junos/IOS XR style: configure → commit confirmed 5 → verify → commit. If you lose access, the device rolls back after 5 minutes. NETCONF offers the same with candidate datastore and <confirmed-commit>.
In depth
A transaction groups several changes so they either all succeed or none take effect. Databases offer this natively; some network and infrastructure systems do too — NETCONF with a candidate datastore commits a whole change at once, and Junos/IOS XR-style commit models validate before activating. Where no native transaction exists, automation has to emulate it with backups and compensating steps.
| System | Transaction support |
|---|---|
| NETCONF candidate + commit | Yes, all-or-nothing |
| Confirmed commit | Auto-rollback unless confirmed |
| Terraform apply | Per resource; no global rollback |
| Plain CLI/SSH | No — line by line |
| SQL | BEGIN … COMMIT/ROLLBACK |
<commit><confirmed/><confirm-timeout>300</confirm-timeout></commit>
A confirmed commit is a safety net for remote changes: if the change cuts off management access, the device rolls back by itself.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Rollback & Recovery > Transaction. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/safe-deployments · confidence 94%