diegomrsantos commented on code in PR #4092:
URL: https://github.com/apache/iggy/pull/4092#discussion_r3983524204


##########
core/server/src/http/handlers.rs:
##########
@@ -1405,17 +1427,18 @@ pub(in crate::http) async fn send_messages(
         .map_err(PartitionWriteError::Rejected)?;
     match query.ack {
         ProduceAck::Replicated => {
+            let policy = topic_durability(&state, &stream_id, &topic_id);
             let (reply, header) = SendWrapper::new(partition_write_replicated(
                 &state,
                 &identity.session,
                 Operation::SendMessages,
                 &body,
             ))
             .await?;
-            let durability = [(
-                DURABILITY_HEADER,
-                HeaderValue::from_static(DURABILITY_REPLICATED_MEMORY),
-            )];
+            let policy = policy.map_or(iggy_common::Durability::Replicated, 
|policy| {
+                policy.confirmed_policy(&state)

Review Comment:
   I've published the reproducer in 
[7a229f9ba](https://github.com/diegomrsantos/iggy/commit/7a229f9baf4eeda6f5ea0d7cb2995bdfed96b362),
 on `test/http-durability-topic-identity` in my fork. It adds only the test and 
its imports, on top of `4a38798a5`.
   
   To run it:
   
   ```sh
   cargo test --locked -p server --all-features --lib 
named_produce_attests_the_dispatched_topic
   ```
   
   It deliberately fails on that baseline with actual `Persisted`, expected 
`Replicated`. I verified this on Linux; the existing 
`completed_produce_checks_the_stored_topic_incarnation` test passes, and Clippy 
passes for the server with all features and targets.
   
   This isolates the current metadata and policy helper sequence. It does not 
run a full HTTP request. If the fix binds the target earlier, the regression 
should move to that request boundary so it tests the resulting behavior. Happy 
to adapt it to the chosen approach.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to