Frun1na opened a new pull request, #4874:
URL: https://github.com/apache/rocketmq-dashboard/pull/4874
## Which Issue(s) This PR Fixes
- Fixes PENDING_BACKFILL
## Brief Description
`instanceService` deduplicates concurrent list requests in an inflight map,
but no mutation invalidated it. The instance page refreshes with `await
createInstance(...); await loadInstances()`; when the refresh joined a list
request that had started before the mutation, the caller received the
pre-mutation snapshot (a created instance missing, or a deleted one still
present).
The fix clears the dedupe cache after every successful mutation
(`createInstance`, `updateInstance`, `deleteInstance`, `deleteInstancesBatch`,
`importCloudInstances`), so a read issued after a write always issues a fresh
request. Mock-mode mutations invalidate the cache too.
## How Did You Test This Change?
New tests in `web/src/services/instanceService.test.ts` pin the behavior for
create/update/delete/batch-delete: a list request held open across the mutation
must not be joined by the post-mutation read. All four fail on the base
revision (the refresh resolves with the pre-mutation fixture) and pass with the
fix:
```
$ npx vitest run src/services/instanceService.test.ts
Test Files 1 passed (1)
Tests 11 passed (11)
```
Regression: `npx vitest run src/pages/instance` → 8 files, 173/173 passed.
`npx tsc --noEmit` and `npx eslint` on the changed files are clean.
--
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]