You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue occurs intermittently when running RUST_BACKTRACE=1 cargo test test_kv_user_client -- --nocapture
When I changed the notification code from getting the corresponding oneshot with get_mut from the map to deleting the corresponding oneshot from the map, the issue was resolved.
// if let Some(mut key_waitings) = self.key_waitings.get_mut(key) {
if let Some((_, key_waitings)) = self.key_waitings.remove(key) { // no panic
for wait_tx in key_waitings.drain(..) {
wait_tx
.send((kvversion, KvValue::RawData(value.clone())))
.unwrap_or_else(|_| panic!("send new key event failed"));
}
}
The text was updated successfully, but these errors were encountered:
I implemented concurrent registration and event notification using key_waitings with DashMap and Tokio’s oneshot in the following code:
The issue occurs intermittently when running
RUST_BACKTRACE=1 cargo test test_kv_user_client -- --nocapture
When I changed the notification code from getting the corresponding oneshot with get_mut from the map to deleting the corresponding oneshot from the map, the issue was resolved.
The text was updated successfully, but these errors were encountered: