Skip to content

Commit 5fca853

Browse files
sanityiduartgomez
authored andcommitted
fix: avoid PUT forward panic before location assigned
1 parent e7b4794 commit 5fca853

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
@@ -1469,7 +1469,15 @@ where
14691469
.ring
14701470
.closest_potentially_caching(&key, &skip_list);
14711471
let own_pkloc = op_manager.ring.connection_manager.own_location();
1472-
let own_loc = own_pkloc.location.expect("infallible");
1472+
let Some(own_loc) = own_pkloc.location else {
1473+
tracing::warn!(
1474+
tx = %id,
1475+
%key,
1476+
skip = ?skip_list,
1477+
"Not forwarding PUT – own ring location not assigned yet; caching locally"
1478+
);
1479+
return true;
1480+
};
14731481

14741482
tracing::info!(
14751483
tx = %id,

0 commit comments

Comments
 (0)