Skip to content

Commit 9cb4025

Browse files
committed
fix: avoid PUT forward panic before location assigned
1 parent b3dea17 commit 9cb4025

File tree

1 file changed

+9
-1
lines changed
  • crates/core/src/operations

1 file changed

+9
-1
lines changed

crates/core/src/operations/put.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,15 @@ where
13951395
.ring
13961396
.closest_potentially_caching(&key, &skip_list);
13971397
let own_pkloc = op_manager.ring.connection_manager.own_location();
1398-
let own_loc = own_pkloc.location.expect("infallible");
1398+
let Some(own_loc) = own_pkloc.location else {
1399+
tracing::warn!(
1400+
tx = %id,
1401+
%key,
1402+
skip = ?skip_list,
1403+
"Not forwarding PUT – own ring location not assigned yet; caching locally"
1404+
);
1405+
return true;
1406+
};
13991407

14001408
tracing::info!(
14011409
tx = %id,

0 commit comments

Comments
 (0)