hubcio opened a new pull request, #3557:
URL: https://github.com/apache/iggy/pull/3557

   The poll-read handler and the consensus tick ran as separate
   tasks but each held a &IggyPartition (from get_by_ns) across
   an .await. The pump task could meanwhile reallocate the
   partitions vec (ReconcileOp::InsertOwned) or take a &mut for
   the same namespace, dangling the held reference: a
   use-after-free on partition create/delete during a parked
   read, and &/&mut aliasing UB on ordinary concurrent
   produce+consume. The single-threaded runtime prevents neither.
   
   The read handler now builds an owned poll plan synchronously
   on the pump, then runs the disk read, straddle and offset
   persist+apply off it on owned data alone (consumer offsets are
   already Arc, the journal tail is snapshotted), so no task holds
   a partition ref off the pump. The consensus tick is folded into
   the pump select! arm, and the view-change and commit handlers
   address one partition by namespace instead of scanning all. A
   with_partition closure plus a debug tripwire enforce it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to