Rust worker read_bulk: re-AddItems advised tags and can serve a stale cached value for unadvised items #240

Open
opened 2026-12-01 19:41:35 -05:00 by dohertj2 · 0 comments
Owner

Found while fixing #238. In src/mxgateway-worker-rust/src/mxaccess/items.rs read_bulk on branch codex/rust-worker, the #238 teardown bug is NOT present: it tracks pre-existing items and only undoes its own AddItem/Advise. Two divergences from the C# fix (fix/238-readbulk-teardown) remain:

  1. For an address the client already holds and has advised but not yet cached, it still calls AddItem for a snapshot instead of waiting on the existing subscription.
  2. Its cached-value check does not require the item to be advised. After an UnAdvise, an item can be served a stale value marked as cached. The C# worker now drops the cached value on UnAdvise (2e6645ef).

Port both behaviours and their regression tests when the Rust worker work resumes.

Found while fixing #238. In `src/mxgateway-worker-rust/src/mxaccess/items.rs` `read_bulk` on branch `codex/rust-worker`, the #238 teardown bug is NOT present: it tracks pre-existing items and only undoes its own AddItem/Advise. Two divergences from the C# fix (`fix/238-readbulk-teardown`) remain: 1. For an address the client already holds and has advised but not yet cached, it still calls AddItem for a snapshot instead of waiting on the existing subscription. 2. Its cached-value check does not require the item to be advised. After an UnAdvise, an item can be served a stale value marked as cached. The C# worker now drops the cached value on UnAdvise (`2e6645ef`). Port both behaviours and their regression tests when the Rust worker work resumes.
dohertj2 added the area:workertype:bugpriority:p3 labels 2026-12-01 19:41:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/mxaccessgw#240