rewind

command
v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Rewind failed work

This sample repairs a failed activity and rewinds its orchestration after the dependency becomes available.

Run

Use a DTS service that supports rewind:

export DTS_CONNECTION_STRING='Endpoint=http://127.0.0.1:8080;TaskHub=default;Authentication=None'
go run ./samples/rewind

What it proves

  • The original execution reaches FAILED before rewind is requested.
  • RewindInstance enqueues recovery rather than waiting for it to finish.
  • Recovery creates a new execution ID and produces the expected "kept:recovered" output.
  • The successful activity runs once, while only the failed activity runs again.
  • Cleanup purges only the sample-owned instance.

WaitForOrchestrationCompletion can initially return the previous failed execution, so the sample polls metadata until it observes the replacement execution complete. SAMPLE_OK rewind is printed only after the recovery assertions, exact-ID cleanup, and worker shutdown succeed.

Rewind follows the pinned Python SDK algorithm. Activity retry-policy histories that contain retry timers are not supported because they can replay nondeterministically. Rewind also cannot repair application code or a dependency that is still failing.

Documentation

Overview

Command rewind repairs a failed activity without repeating successful work.

export DTS_CONNECTION_STRING="Endpoint=http://localhost:8080;TaskHub=default;Authentication=None"
go run ./samples/rewind

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL