plan: drop segfaults when dispatched in-process

Found while writing the positional-refusal tests and not caused by them --
it reproduces at 3c5eee2 with that work stashed. One insert followed by one
drop against a TestDb engine terminates with SIGSEGV and no stack trace,
while 25 insert/update/distinct/drop cycles over the wire are clean, so what
differs is the in-process caller rather than the command.

Worth more than it looks: D1's architecture is "in-process server now,
library + C API later", and this is that path. `drop` has no unit test in
the tree at all, which is why it went unseen.
This commit is contained in:
A.Shakhmatov
2026-08-10 18:21:14 +03:00
parent f04e7125c9
commit 8136ffe8d4

13
PLAN.md
View File

@@ -1045,6 +1045,19 @@ has to be its own commit with its own re-recorded scorecard.
`$out`/`$merge` durability semantics, whether the expression evaluator is `$out`/`$merge` durability semantics, whether the expression evaluator is
shared with M3's pipeline updates, and whether `allowDiskUse` has to stop shared with M3's pipeline updates, and whether `allowDiskUse` has to stop
being a lie. being a lie.
- **`drop` segfaults when dispatched in-process** — found while writing the
positional-refusal tests, unrelated to them, and **reproduces at `3c5eee2`
with the change stashed**, so it is not caused by that work. A single
`insert` followed by a single `drop` against a `TestDb` engine terminates
with SIGSEGV and no stack trace; dropping a collection that never existed is
fine. The wire path is clean — 25 insert / refused-update / distinct / drop
cycles against a live server on `:27020` all passed — so what differs is the
in-process caller, not the command. That matters more than it looks: D1's
whole architecture is "in-process server now, library + C API later", and
this is the embedding path. **`drop` has no unit test at all** — the only
`parse_fake_msg("drop", ...)` calls in the tree were the scratch ones written
to find this — which is why it went unseen. Needs its own commit: reproduce
it in a committed test first, then fix.
- **M3 update operators** — open. `distinct` landed first because it was a - **M3 update operators** — open. `distinct` landed first because it was a
whole missing command with no dependencies, and measuring it turned up three whole missing command with no dependencies, and measuring it turned up three
things worth keeping, none of which are `distinct`'s to fix: things worth keeping, none of which are `distinct`'s to fix: