Skip to content

PUT operations fail to send over network after target selection #1944

@iduartgomez

Description

@iduartgomez

Summary

PUT operations fail to send messages over the network. The operation correctly:

  • Receives the client request
  • Selects the optimal target peer
  • Creates a RequestPut message
  • Calls notify_op_change

However, the RequestPut message never reaches process_message, so the SeekNode message is never created and the PUT operation never goes out over the network, resulting in a timeout.

Reproduction

Run the ubertest with River:

UBERTEST_PEER_COUNT=2 cargo test --test ubertest -- --nocapture

The test will fail with:

Error: Room creation failed: Error: Timeout waiting for PUT response after 10 seconds

Root Cause

In crates/core/src/operations/put.rs:1047-1066, the request_put function creates a RequestPut message and calls notify_op_change, expecting the notification to trigger message processing. However, the notification is not being picked up by the event loop to invoke process_message on the RequestPut message.

Log Evidence

[2025-10-13T09:03:06.567293Z DEBUG] Requesting put with existing transaction ID
[2025-10-13T09:03:06.567351Z DEBUG] Determined PUT routing target, target_peer: Some("v6MWKgqJtu7MJ9jv")
[2025-10-13T09:03:06.567360Z DEBUG] Forwarding PUT to target peer
[2025-10-13T09:03:06.567378Z DEBUG] Calling notify_op_change to send PUT message to network

Note: No subsequent log showing "Requesting put for contract" (which would appear in process_message when handling RequestPut), and no SeekNode message is created.

Expected Behavior

Similar to GET operations (which work correctly), when notify_op_change is called with a RequestPut message, it should:

  1. Be picked up by the event loop
  2. Trigger process_message with the RequestPut message
  3. Create a SeekNode message (as implemented in lines 237-245 of put.rs)
  4. Send the SeekNode message over the network

Impact

  • Critical: All PUT operations fail to propagate over the network
  • Blocks River chat application functionality
  • Prevents the ubertest from passing in CI

Investigation Branch

fix/put-operation-network-send

Related

Next Steps

Need to investigate:

  1. How the event loop processes notifications from notify_op_change
  2. Why GET operations work but PUT operations don't (both use the same pattern)
  3. Whether the issue is in the notification routing or message processing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions