Let snapshots with a delta callback installed use the insert route
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #2136 by @justinjoy — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start in col_session_snapshot_impl() and the #1030 guard that sets pending_full_input_eval, then read session_snapshot_insert() and col_session_set_delta_cb to see when the insert route applies. First settle the open question of what a snapshot owes a delta callback, since that decides whether the guard can be dropped or whether head_delta must be sent to the observer. Done means the new tests pass at W=1 and W=4 and tests/test_easy_callback_cleared.c and tests/test_easy_callback_snapshot.c stay green.
Written by the indexing model from the issue text.
Description
Summary
With a delta callback installed, a snapshot after an incremental insert still evaluates in full: the #1030 guard in col_session_snapshot_impl() sets pending_full_input_eval when delta_cb != NULL && last_inserted_relation != NULL, and clearing the callback with an insert pending does the same (#2108, col_session_set_delta_cb). Since #2114 the insert route (session_snapshot_insert(), occurrence-bound instances) is correct for monotone, aggregate-free strata, so these guards now only cost speed.
Question to settle first
What a snapshot owes a delta callback. Snapshots publish the model through the snapshot callback; delta events are emitted by steps (col_session_step_impl / col_stratum_step_with_delta). Confirm whether a snapshot with a callback installed must leave the session so the next step reports exactly the changes since the last step, and whether the insert route already satisfies that (the #2114 review probe found a delta-callback step after an insert-route snapshot fired exactly the expected deltas).
Proposed change
- If the snapshot owes callbacks nothing beyond that, drop the #1030 guard and the #2108 flag for strata the insert route admits, and keep them for the rest.
- If it must report the insert's changes, return each stratum's head deltas (
head_deltafromwl_columnar_eval_tdd_insert_stratum(), already untimed private copies) to the delta observer instead of falling back to a full evaluation. - Tests: snapshots with a callback installed after incremental inserts (internal API and
wl_session_make_compound), followed by steps, compared with a session that never had a callback; and the callback event sequences compared with a full-evaluation session.
Acceptance
- Correct models and callback sequences in the new tests at W=1 and W=4.
tests/test_easy_callback_cleared.candtests/test_easy_callback_snapshot.cstay green.
- Dominant language
- C
- Stars
- 18
- Forks
- 2
- Avg merge
- 6h 16m
- Merged PRs (30d)
- 286
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
-
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
-
bug
Difficulty 4/5 1-2 days Newbie friendliness 54/100
semantic-reasoning/wirelog#2202 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
semantic-reasoning/wirelog#2201 ·
Maintainers usually reply within 1 day
All issues in semantic-reasoning/wirelog
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 8 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
native-cpu: -Wreturn-type in skainet_row_threads.c:150 (worker fn has no return)Possibly taken @Doomguy-BFG9000 claimed this today. Opengood first issue size:xs skill:native
Difficulty 1/5 Under an hour Newbie friendliness 78/100
SKaiNET-developers/SKaiNET#1358 · 1 comment ·
Maintainers usually reply within 1 day
-
I/O internal correctness medium priority rt_lib
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day