You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "menghaoranss (via GitHub)" <gi...@apache.org> on 2026/08/06 01:18:40 UTC
[PR] Implement mutable data node rule attribute with copy-on-write support [shardingsphere]
menghaoranss opened a new pull request, #39355:
URL: https://github.com/apache/shardingsphere/pull/39355
Changes proposed in this pull request:
- Implement mutable data node rule attribute with copy-on-write support
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
- [ ] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Implement mutable data node rule attribute with copy-on-write support [shardingsphere]
Posted by "menghaoranss (via GitHub)" <gi...@apache.org>.
menghaoranss merged PR #39355:
URL: https://github.com/apache/shardingsphere/pull/39355
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Implement mutable data node rule attribute with copy-on-write support [shardingsphere]
Posted by "menghaoranss (via GitHub)" <gi...@apache.org>.
menghaoranss commented on PR #39355:
URL: https://github.com/apache/shardingsphere/pull/39355#issuecomment-5199418691
```markdown
### Result
**Review Result: Mergeable**
PR #39355 is mergeable from a code-correctness perspective. No blocking functional, concurrency, compatibility, or test issues were found.
### Evidence
- The latest public head is [`8574e8046f9`](https://github.com/apache/shardingsphere/commit/8574e8046f9eb59728f87175d4314e3b5e14917e), containing one commit and 12 changed files.
- GitHub’s authoritative changed-file list matches the local triple-dot scope from merge base `a07ecb5365b`.
- The newer master commit only changes Oracle parser files and does not overlap this PR.
- `SingleRule` copies its configuration, data-source names, DataNode map, and nested collections without database I/O, then rebuilds attributes that depend on mutable state.
- `RuleMetaData` preserves rule order, replaces only mutable DataNode rules, and keeps repeated additions and missing removals idempotent.
- `ShardingSphereDatabase` uses a volatile reference, synchronized updates, and whole-snapshot replacement for atomic visibility.
- `reloadRules()` no longer exposes a temporarily empty rule collection through `clear()` followed by `addAll()`.
- DROP TABLE/VIEW uses atomic snapshot removal, while CREATE TABLE/VIEW retains its existing low-frequency behavior.
- The concurrency test verifies internally consistent SingleRule snapshots and confirms that the original rule remains unchanged.
### Coverage
- Reviewed all 6 production files and 6 test files.
- Completed root-cause, blast-radius, test/runtime, and final convergence passes.
- 175 scoped tests passed.
- Spotless and Checkstyle passed.
- No public review comments or additional linked requirements were present.
- This assessment covers code correctness only; CI was not reviewed.
```
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org