diff --git a/changelog.d/9330-tombstones-default-on.md b/changelog.d/9330-tombstones-default-on.md new file mode 100644 index 0000000000..b24a3b21d7 --- /dev/null +++ b/changelog.d/9330-tombstones-default-on.md @@ -0,0 +1,9 @@ +### Performance + +- **Tombstone deletes are default-on again.** #9038's O(1) delete (6.5× on + populated delete, ~15× vs node at the time) was rolled back to opt-in by + #9212 because of #9200 — an evacuating minor could sweep a deleted + receiver's live keys array, leaving it shapeless. #9317 fixed that + structurally (every post-birth ShapeId publish arms `old_carrier` through a + single funnel), so the win returns to the default configuration. + `PERRY_OBJECT_TOMBSTONES=0` remains the kill switch. diff --git a/crates/perry-runtime/src/object/delete_rest.rs b/crates/perry-runtime/src/object/delete_rest.rs index 3507a09cee..ddde8fd752 100644 --- a/crates/perry-runtime/src/object/delete_rest.rs +++ b/crates/perry-runtime/src/object/delete_rest.rs @@ -1500,13 +1500,19 @@ fn object_tombstone_deletes_enabled() -> bool { } static ON: std::sync::OnceLock = std::sync::OnceLock::new(); *ON.get_or_init(|| { - // #9200: keep tombstones opt-in until an evacuating-GC interaction - // with class dispatch is fixed. The default-on route can restore a - // deleted receiver to its canonical class shape after relocation, - // making Object.keys() empty and fixed-slot reads return wrong data. - matches!( + // DEFAULT-ON again (#9038's 6.5x populated-delete win). #9212 made + // this opt-in because of #9200 — an unarmed successor descriptor let + // an evacuating minor sweep a deleted receiver's live keys array — + // and #9317 fixed that structurally: every post-birth ShapeId publish + // now routes through `stamp_object_shape_id_with_carrier_note`, which + // arms `old_carrier` for any non-nursery receiver, so the descriptor + // (and the keys array only it reaches) is rooted by construction. + // `PERRY_OBJECT_TOMBSTONES=0` remains the kill switch for A/B and + // attribution — the same switch that isolated #9108, #9110 and #9200 + // each in one command. + !matches!( std::env::var("PERRY_OBJECT_TOMBSTONES").as_deref(), - Ok("1") | Ok("on") | Ok("true") + Ok("0") | Ok("off") | Ok("false") ) }) }