d-wang-commit opened a new pull request, #18990: URL: https://github.com/apache/iotdb/pull/18990
## Description When tree database `root.pg` and table database `pg` coexist, their MTree entries share the internal path `root.pg`. Merging schemas by that path overwrites the table schema, leaving its maximum RegionGroup counts stale and undercounting databases when calculating other databases' limits. Key the lookup by `TDatabaseSchema.name` so both databases participate in adjustment. Explicitly exclude both audit database names during deletion to preserve the existing filtering behavior with the corrected keys. ### Tests - UT: `ClusterSchemaManagerTest#testAdjustMaxRegionGroupNumWithMixedModels` applies the real adjustment plan and checks both maximum RegionGroup counts for every database as the database count grows from one to three (12 -> 6 -> 4). `ConfigManagerDatabaseDeletionTest` covers table audit database deletion filtering. - Validation: Both targeted UTs passed after rebasing onto `upstream/master`. - IT: No integration test additions or changes; no IT run for this revision. ### Side effects and risks Correcting the database count may decrease other databases' calculated limits, while preserving already allocated RegionGroups. No serialization or protocol changes. <hr> This PR has: - [x] been self-reviewed. - [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader. - [x] added unit tests or modified existing tests to cover new code paths. <hr> ##### Key changed/added classes (or packages if there are too many classes) in this PR - `ClusterSchemaInfo`: retain both database models in schema lookups. - `ConfigManager`: preserve audit database filtering. - `ClusterSchemaManagerTest`: verify actual mixed-model limit recalculation and database counting. - `ConfigManagerDatabaseDeletionTest`: cover table audit database deletion filtering. -- 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]
