Skip to content

Commit 3ffb467

Browse files
committed
fix: avoid PUT forward panic before location assigned
1 parent 78ccee7 commit 3ffb467

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
@@ -1397,7 +1397,15 @@ where
13971397
.ring
13981398
.closest_potentially_caching(&key, &skip_list);
13991399
let own_pkloc = op_manager.ring.connection_manager.own_location();
1400-
let own_loc = own_pkloc.location.expect("infallible");
1400+
let Some(own_loc) = own_pkloc.location else {
1401+
tracing::warn!(
1402+
tx = %id,
1403+
%key,
1404+
skip = ?skip_list,
1405+
"Not forwarding PUT – own ring location not assigned yet; caching locally"
1406+
);
1407+
return true;
1408+
};
14011409

14021410
tracing::info!(
14031411
tx = %id,

0 commit comments

Comments
 (0)