Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ serde_json = { version = "1.0", features = ["preserve_order"] }
uuid = { version = "1.0", features = ["v4", "serde"] }

# duroxide integration
duroxide = "=0.1.29"
# Using git dependency on pinodeca/continue-parent-link branch which preserves the
# parent link when a sub-orchestration calls continue_as_new, unblocking the
# sub-orchestration approach for df.loop.
# Compatibility: duroxide-pg 0.1.34 has been verified to compile and run correctly
# against this branch (same public API as 0.1.29 — PR #31 is a runtime-only change).
# Once the branch is merged and a new duroxide release is published, revert both
# entries back to crates.io version pins as a compatible pair.
duroxide = { git = "https://github.com/microsoft/duroxide.git", branch = "pinodeca/continue-parent-link" }
duroxide-pg = "=0.1.34"
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time"] }

Expand All @@ -55,6 +62,11 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[dev-dependencies]
pgrx-tests = "=0.16.1"

# Override the crates.io duroxide with the git branch for both the direct dependency
# and duroxide-pg's transitive dependency on duroxide.
[patch.crates-io]
duroxide = { git = "https://github.com/microsoft/duroxide.git", branch = "pinodeca/continue-parent-link" }

[profile.dev]
panic = "unwind"

Expand Down
6 changes: 6 additions & 0 deletions USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,12 @@ SELECT df.start(

Use `@>` operator or `df.loop()` to create functions that run forever. Each iteration creates a new execution with fresh state (via continue-as-new).

> **Note:** Each `df.loop()` runs as its own child orchestration. The loop's iterations
> (the continue-as-new generations) are scoped to that child, so any nodes *before* the
> loop in the graph run exactly once and any nodes *after* the loop run once the loop
> exits. When inspecting `df.instances`, a looping function therefore shows a parent
> instance plus a separate child instance for the loop.

```sql
-- Simple heartbeat every 30 seconds (using @> operator)
SELECT df.start(
Expand Down
Loading
Loading