zjncs opened a new issue, #5599:
URL: https://github.com/apache/rocketmq-dashboard/issues/5599

   ## Description
   
   The console's Extend-TTL modal (`web/src/pages/studio/LiteTopic.tsx`) calls 
`extendLiteTopicTTL(topicPattern, newTTL)`, which POSTs `{ topicPattern, newTTL 
}` — **no `instanceId`**:
   
   ```ts
   // web/src/api/liteTopic.ts
   export async function extendLiteTopicTTL(topicPattern: string, newTTL: 
number): Promise<void> {
     await client.post('/liteTopic/extendTTL', { topicPattern, newTTL });
   }
   ```
   
   But the backend `LiteTopicTTLUpdateDTO` declares:
   
   ```java
   @NotBlank(message = "instanceId is required")
   private String instanceId;
   ```
   
   (tightened in #5006, "Require a non-blank instanceId on topic/group delete 
and TTL update" — the write is ownership-checked against the owning instance, 
and the provider comment states "TTL writes must explicitly specify the owning 
instance; the legacy entry point must not fall back to the default 
connection"). The backend's own test pins this exact body to a rejection: 
`LiteTopicControllerTest.ttlRequiresExplicitInstanceTest` POSTs 
`{"topicPattern":"chat","newTTL":60000}` — precisely what the frontend sends — 
and asserts `status().isBadRequest()`.
   
   No axios interceptor injects `instanceId`, and the LiteTopic page has no 
instance selector at all — the write path was tightened without updating the 
only frontend caller.
   
   ## Impact
   
   In any real (non-mock) deployment, clicking Confirm in the Extend TTL dialog 
**always** fails with "instanceId is required"; the TTL-extension feature is 
100% broken from the UI.
   
   ## Expected behavior
   
   The modal should identify the owning instance and send it: load the instance 
list when the dialog opens (only Apache-vendor instances are supported for this 
ownership-checked write), auto-select when exactly one candidate exists, 
require the selection otherwise, and include `instanceId` in the POST body.
   
   ## Environment
   
   - branch: master (0228dad5)
   - files: `web/src/api/liteTopic.ts`, `web/src/pages/studio/LiteTopic.tsx`


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