Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Recursive strata return a different model at two or more workers for some programs

Closed
#2,127 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@justinjoy is already working on this.

Since Oct 21, 2026.

  • #2237 by @justinjoy — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c
Domain
backend, testing

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from semantic-reasoning/wirelog

All issues in semantic-reasoning/wirelog

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.