Sean-Walker0 commented on PR #7817: URL: https://github.com/apache/shenyu/pull/7817#issuecomment-6286099542
Addressed in the new commit — the review was right on all three counts: 1. **Comparison side**: `update()` now snapshots the row with `selectById` **before** writing and passes `before`/`after` into the refresh; `updateSelective` null fields are treated as unchanged via an `effective(value, fallback)` helper, so a name-only edit cannot produce a spurious refresh. 2. **Type-change routing**: `removeDiscovery` goes through `chooseProcessor(before.getDiscoveryType())` (the processor that actually holds the old repository); the replacement is created on the effective post-update type with null fields backfilled from the snapshot. 3. **Test realism**: `selectById` now returns independent snapshots (`thenAnswer` + copy helper, like a real DB read) and `updateSelective` mutates the stored row — the change-detection test fails on the previous self-comparing implementation (verified locally) and both tests now exercise achievable states. 27/27 green, `shenyu-admin` checkstyle 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]
