Skip to content

Commit 613e7c0

Browse files
committed
fix: avoid PUT forward panic before location assigned
1 parent 2290d34 commit 613e7c0

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
@@ -1309,7 +1309,15 @@ where
13091309
.ring
13101310
.closest_potentially_caching(&key, &skip_list);
13111311
let own_pkloc = op_manager.ring.connection_manager.own_location();
1312-
let own_loc = own_pkloc.location.expect("infallible");
1312+
let Some(own_loc) = own_pkloc.location else {
1313+
tracing::warn!(
1314+
tx = %id,
1315+
%key,
1316+
skip = ?skip_list,
1317+
"Not forwarding PUT – own ring location not assigned yet; caching locally"
1318+
);
1319+
return true;
1320+
};
13131321

13141322
tracing::info!(
13151323
tx = %id,

0 commit comments

Comments
 (0)