Schema Import Failure: RemapManager fails during cleanup#1329
Open
RohitPtnkr1996 wants to merge 14 commits intomainfrom
Open
Schema Import Failure: RemapManager fails during cleanup#1329RohitPtnkr1996 wants to merge 14 commits intomainfrom
RohitPtnkr1996 wants to merge 14 commits intomainfrom
Conversation
khanaffan
approved these changes
Feb 11, 2026
rschili
approved these changes
Feb 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a schema remapping cleanup failure when a class is deleted after remap info for its property maps has been collected (specific schema evolution scenario involving property overrides + derived class deletion).
Changes:
- Add regression test covering “delete property override + delete derived class” for both regular and V8 legacy schema import paths.
- Prevent remap cleanup from attempting to restore property maps for classes that get deleted during the same import.
- Add a VS Code debug launch configuration for iModelConsole.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| iModelCore/iModelPlatform/Tests/DgnProject/NonPublished/SchemaRemap_Test.cpp | Adds a regression test to reproduce and validate the remap cleanup fix. |
| iModelCore/ECDb/ECDb/SchemaWriter.cpp | Calls into RemapManager during class deletion to avoid restoring mappings for deleted classes. |
| iModelCore/ECDb/ECDb/RemapManager.h | Adds a helper to drop cleaned mapping info for a class being deleted. |
| .vscode/launch.json | Adds a new debug configuration for iModelConsole. |
iModelCore/iModelPlatform/Tests/DgnProject/NonPublished/SchemaRemap_Test.cpp
Outdated
Show resolved
Hide resolved
iModelCore/iModelPlatform/Tests/DgnProject/NonPublished/SchemaRemap_Test.cpp
Outdated
Show resolved
Hide resolved
iModelCore/iModelPlatform/Tests/DgnProject/NonPublished/SchemaRemap_Test.cpp
Show resolved
Hide resolved
iModelCore/iModelPlatform/Tests/DgnProject/NonPublished/SchemaRemap_Test.cpp
Outdated
Show resolved
Hide resolved
iModelCore/iModelPlatform/Tests/DgnProject/NonPublished/SchemaRemap_Test.cpp
Show resolved
Hide resolved
…Remap_Test.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…Remap_Test.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
aruniverse
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A user reported their major schema upgrade was failing with the error "Failed to find class SILO for ensuring persisted property maps."
On further investigation, this was due to a very specific schema evolution scenario:
When deleting the property override, the remap manager collects the remap info for the child class using its property map.
Later, the child class gets deleted.
On cleanup and remapping, when the remap manager tries to restore the saved property map info, it fails to find the child class and throws the error.
Fixes https://github.com/iTwin/itwinjs-backlog/issues/1857