menghaoranss commented on PR #39244:
URL: https://github.com/apache/shardingsphere/pull/39244#issuecomment-5087098301
```markdown
### Summary
**Review Result: Mergeable**
Reason: No blocking issues were found within the reviewed code scope. The
change correctly fixes the version mismatch in Standalone mode. CI was not
reviewed by request.
### Evidence
- Reviewed latest head `1d981373387b3452b3454a8bf89c378b9f2b7b58`; both base
and merge-base are `b084c23351448396c4c9e22b927268abd5748742`.
- GitHub’s `/files` response matches the local triple-dot diff: one
production file and one test file, with two additions and two deletions.
- `VersionPersistService.persist()` persists version N, switches
`active_version` to N, and returns N. The previous implementation returned N−1,
which contradicted both the method contract and repository state.
- Standalone mode passes the returned version to `ActiveVersionChecker`.
Before this fix, comparing N−1 with N failed and prevented the rule item from
being refreshed. Returning N makes the refresh execute correctly.
- Cluster mode discards the returned `MetaDataVersion` collection and
refreshes through its metadata reload path, so this return-value correction
does not change its control flow.
- The regression test now expects version 11 when version 10 already exists,
while retaining coverage for the initial version 0 case.
- Local verification passed:
- `DatabaseRulePersistServiceTest`: 6 tests, 0 failures, 0 errors
- `StandaloneMetaDataManagerPersistServiceTest`: 18 tests, 0 failures, 0
errors
- `git diff --check`: passed
### Review Details
- No P0, P1, or P2 code-correctness issues were found.
- The change is minimal and introduces no public API, dependency,
configuration, or unrelated refactoring changes.
- The first local test run was blocked before reaching business assertions
because JDK 21/Byte Buddy could not self-attach inside the sandbox. The
unchanged command passed completely when rerun outside the sandbox.
- CI not reviewed by request.
```
--
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]