-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Destroy Dataset with a Mapped DataFile #6860
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had forgotten that there's a DeleteMapLayerMetadataCommand but this comment makes me wonder why we don't call it. I get that we don't need to call it thanks to the cascade, but would calling the command cause problems? Does it do more than we want? It seems to clean up thumbnails, for example. Also, there's tiny typo above: dedicatd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still curious about these questions but there's no need to hold this up from QA so I moved it over. This pull request adds a lot of value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed the original question 4 hours ago. I guess the answer is, the delete layer command is a more surgical tool; it's for a case where we just need to delete the layer, without touching the file.
Calling it in the context of trying to wipe everything, including the datafile and all its associated physical files, would not hurt, strictly speaking - but I couldn't think of why we would want to call it either; seeing how the cascade is more reliable? It does remove the map thumbnails - but then we run a full physical file cleanup after DeleteDataFileCommand, that will delete all aux files associated with the datafile, thumbnails and otherwise.
And then again there is the fact the command doesn't do everything we need, either. It does not attempt to go out and remove whatever possible data may be sitting on the WorldMap side. I could only assume that it was by design.
My attitude with this PR was to check in something ASAP that works and doesn't break things.
I generally sympathize with the goals of making things cleaner; calling commands instead of database queries and such. But in the case of WorldMap, the whole is a big hack - isn't it? Our attempt to "think about it some more" to see if we were doing everything right resulted in a 2.5 year delay, and a whole bunch of these un-destructible datasets still sitting in production...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agreed. I don't think this will break anything and it definitely adds value. Thanks for the explanation.