Recursive strata return a different model at two or more workers for some programs
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by tracing the TDD strategy paths named in the issue: owner, bdx, and global_read, and compare each program's model across worker counts. Add the four programs with fixed failing data as regression cases, then run comparisons for W=2/4 against W=1 with the passes both enabled and disabled. Done means all worker counts return the W=1 model, or affected strata fall back to sequential evaluation.
Written by the indexing model from the issue text.
Description
Summary
Some recursive programs return a different model at two or more workers than at one worker. This happens with and without the fusion, JPP and SIP passes, so production entry points are affected. The plan names no partitioned input relation for these programs, and every EXCHANGE key is a column of its relation, so the EXCHANGE metadata fixed in #2118 is not the cause.
Reproduces on main ba56c9c7 and on the #2118 branch.
Reproduction
Each program below gets 80 random rows per input relation, values in [0, 25), from glibc srand(1); rand() % 25, one row per wl_session_insert, in plan EDB order, with WIRELOG_TDD_MIN_ROWS_PER_WORKER=1. Then:
- one snapshot (
inc_029: snapshot, then insert another 21 rows per relation, then snapshot again); - the model is compared, as a multiset digest, against W=1.
The harness used was a small C driver; any equivalent loader reproduces it.
| program | passes | W=1 rows | W=2/4/8 rows |
|---|---|---|---|
| A | on and off | 21 | 19 |
| B (incremental) | on and off | 601 | 625 |
| C | on and off | 275 | 273 |
| D | on and off | 1273 | 120 |
A
.decl e0(c0: int64, c1: int64, c2: int64)
.decl e1(c0: int64, c1: int64)
.decl e2(c0: int64, c1: int64, c2: int64)
.decl e3(c0: int64, c1: int64, c2: int64)
.decl l0(c0: int64, c1: int64)
.decl a(c0: int64, c1: int64)
.decl b(c0: int64, c1: int64)
l0(x0,x1) :- e3(x0,x1,x0).
a(x0,x0) :- e0(x1,x0,y0), e1(x1,x2), x1 < x0.
b(x3,x0) :- e3(x1,x0,0), e1(x2,x1), l0(x2,x3).
b(x2,x2) :- e0(x0,x1,x0), a(x1,x2), !e3(x1,x2,x0).
a(x0,x3) :- b(x0,x1), e0(x1,x2,1), e2(x0,x3,x2), !e3(x0,x0,x0).
b(x0,x1) :- a(x0,x1), e3(x1,x1,x2).
B
.decl e0(c0: int64, c1: int64, c2: int64)
.decl e1(c0: int64, c1: int64, c2: int64)
.decl e2(c0: int64, c1: int64)
.decl e3(c0: int64, c1: int64)
.decl a(c0: int64, c1: int64)
.decl z(c0: int64)
a(x3,x3) :- e0(x1,x0,0), e1(x2,x1,x1), e3(x2,x3).
a(x2,x0) :- e0(x1,x0,y0), e2(x2,x1).
a(x2,x2) :- a(x0,x1), e3(x1,x2).
a(x0,x3) :- e2(x0,x1), e3(x1,x2), a(x2,x3).
a(x2,x2) :- a(x1,x0), a(x1,x2), x0 != x1.
a(x0,x2) :- a(x0,x1), a(x2,x1), !e2(x1,x2).
z(x0) :- e2(x0,x0), !a(x0,x0).
C
.decl e0(c0: int64, c1: int64, c2: int64)
.decl e1(c0: int64, c1: int64)
.decl e2(c0: int64, c1: int64)
.decl e3(c0: int64, c1: int64)
.decl a(c0: int64, c1: int64)
.decl b(c0: int64, c1: int64)
a(x1,x0) :- e3(x0,x1).
a(x1,x0) :- e0(x0,3,2), e2(x1,x2).
b(x0,x3) :- e2(x1,x0), e3(x1,x2), e1(4,x3).
b(x1,x1) :- e0(1,x1,y0), e2(x1,x2), a(x2,x3).
a(x0,x3) :- b(x0,x1), e1(x2,x1), e0(x3,x2,x1).
b(x2,x2) :- b(x0,x1), e3(x1,x2).
D
.decl e0(c0: int64)
.decl e1(c0: int64, c1: int64)
.decl e2(c0: int64, c1: int64, c2: int64)
.decl l0(c0: int64, c1: int64)
.decl a(c0: int64, c1: int64)
.decl b(c0: int64, c1: int64)
l0(x0,x1) :- e1(x0,x1).
a(x0,x0) :- e0(x0), !l0(x0,x0).
a(x2,x2) :- e1(x0,x1), e1(x2,x1).
b(x1,x1) :- l0(x0,x1), !e1(x0,x1).
b(x0,x0) :- e1(x0,x1), l0(x1,x2), !l0(x1,x1), x0 < x1.
b(x0,x3) :- l0(x0,x1), a(x2,x1), l0(x2,x3), x2 != x1.
b(x0,x3) :- e2(x0,x1,2), e1(x1,x2), a(x2,x3).
a(x2,x2) :- a(x0,x1), e1(x2,x1), !e2(x1,x1,x1).
a(x2,x0) :- e1(x1,x0), b(x2,x1), x1 != x2.
Expected
Every worker count returns the W=1 model.
Scope / acceptance
- Find the TDD strategy path (owner, bdx, global_read) that loses or adds rows for each program, and fix it, or make the stratum fall back to sequential evaluation where the strategy cannot be made complete.
- Add the four programs, with fixed data that fails before the fix, as regression cases comparing W=2/4 with W=1, with and without the passes.
- Dominant language
- C
- Stars
- 18
- Forks
- 2
- Avg merge
- 9h 28m
- Merged PRs (30d)
- 169
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from semantic-reasoning/wirelog
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
semantic-reasoning/wirelog#2229 ·
Maintainers usually reply within 1 day
-
Doc: insert executor and incremental consolidation leave sorted runs, not globally sorted headsOpen
Difficulty 1/5 Under an hour Newbie friendliness 83/100
semantic-reasoning/wirelog#2133 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
semantic-reasoning/wirelog#2042 ·
Maintainers usually reply within 1 day
-
p2-medium
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
semantic-reasoning/wirelog#1914 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
semantic-reasoning/wirelog#2262 ·
Maintainers usually reply within 1 day
All issues in semantic-reasoning/wirelog
Similar issues
-
dependency component: oneMKL module: dpclang
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
intel/torch-xpu-ops#5880 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
CVE-2026-111497Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
fink/fink-distributions#1322 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
openvehicles/Open-Vehicle-Monitoring-System-3#1563 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100