unbridled-41 opened a new issue, #5937:
URL: https://github.com/apache/rocketmq-dashboard/issues/5937

   ### Studio Version
   branch: `rocketmq-studio` @ `7e7aa344` (the revision verified; the branch is 
based on it)
   deployed as: not required to reproduce
   
   ### Runtime Environment
   
   Reproduced with the backend tests (`cd server && mvn -o -B -ntp test 
-Dtest='NotificationOutboxServiceTest'`).
   
   ### Connected RocketMQ Cluster
   
   Not involved; the rows live in `rmq_alert_notification_outbox`.
   
   ### Describe the Bug
   
   `retryFailedDeliveries` isolates each id from the others on purpose, but 
only catches `BusinessException`:
   
   ```java
   for (Long deliveryId : new LinkedHashSet<>(deliveryIds)) {
       try { retryFailedDelivery(deliveryId); succeeded.add(deliveryId); }
       catch (BusinessException error) { failures.put(deliveryId, 
error.getMessage()); }
   }
   ```
   
   Every id is committed by its own `mapper.update` before the next iteration, 
so a `RuntimeException` on a later row (a `DataAccessException`, an unexpected 
mapping failure) escapes the loop and answers the whole request with a 500 - 
discarding the per-id outcome of the rows that were already flipped to 
`PENDING`. The page then shows the bulk-retry error and does not reload, so 
those rows keep displaying `FAILED` although the dispatcher will deliver them. 
This is the same per-item isolation `InstanceService.deleteInstances` and 
`AlertService.bulkDeleteRules` already implement.
   
   ### Steps to Reproduce
   
   1. Select several failed deliveries on the Alert Deliveries page and press 
the bulk retry.
   2. Let one of the updates fail with an unexpected (non-business) exception.
   3. The request 500s although earlier deliveries are already queued for 
dispatch.
   
   ### What Did You Expect to See?
   
   The per-id outcome: the ids that were queued, and the ones that failed with 
their reason.
   
   ### What Did You See Instead?
   
   A total failure, with deliveries left in a state the page does not show.
   
   ### Evidence
   
   - `server/.../ops/alert/NotificationOutboxService.java` 
(`retryFailedDeliveries`, `retryFailedDelivery`), 
`web/src/pages/ops/notificationDeliveries.tsx`.
   - `cd server && mvn -o -B -ntp test 
-Dtest='NotificationOutboxServiceTest#bulkRetryKeepsTheOutcomeOfEarlierDeliveriesWhenALaterOneFailsUnexpectedlyTest'`
 - fails before the fix (the exception escapes).
   
   ### Impact
   
   A partially applied bulk action is reported as a total failure, and the 
table contradicts the real outbox state until the next reload.
   
   ### Acceptance Criteria
   
   - A per-id failure of any type is recorded for that id and the loop 
continues, with a regression test.
   
   **Corresponding PR:** #ISSUEPR#
   


-- 
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