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

Let snapshots with a delta callback installed use the insert route

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

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
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
databases

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

enhancement

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_delta from wl_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.c and tests/test_easy_callback_snapshot.c stay green.
Dominant language
C
Stars
18
Forks
2
Avg merge
6h 16m
Merged PRs (30d)
286

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.