-
Notifications
You must be signed in to change notification settings - Fork 66
Orphaned Amps Fix #282
Comments
I think rather than a where clause, an if/then with the same check could produce a more informative error instead of quietly letting it go. |
I suspect this error also appears if you create an amp with Roxy, and then remove the amp from the ml-config, without doing a wipe first. Then, if you wipe the entire project the amp will get left behind, but with an invalid database ref.. |
I agree letting it go quietly is a missed opportunity to report something. Not sure throwing an error is the best solution though. The amp might be unrelated to the project that you try to bootstrap, bit hard to tell. Easiest to tell by db-name, and that is precisely what is missing. I'll push a change that will log a message in the ErrorLog. That is at least something.. |
Fixed #282: catching and logging orphaned amps
I wrote this for getting rid of dead amps, if that's at all helpful. This is largely the problem here I think. Ken |
Applied formatting to code from Ken:
|
I think it could be worth looking if this could be integrated into wipe. I'll open a new ticket since this ticket was about bootstrapping.. |
Hello
If you do a bootstrap using a modules db, then switch your config to use 'filesystem' as the modules db ( bootstrap after doing this ) , then do a wipe, any amps belonging to the original modules db will get orphanned - you can see this in the 'Amps' page as the amp in question will have a number as the 'database'.
If this happens, you will get an error in setup:get-amps when you next bootstrap near this line
xdmp:database-name($amp/sec:database)
as the db no longer exists. The manual fix is to delete the offending amp.
This is the error you will get
The code fix ( below ) is to ignore it.
Note if you try to re-create the error you may get SEC-AMPEXISTS after you have reproduced then added the patch - this is a consequence of the fact that the original error does not get rolled back. However if you undo what you got when trying to recreate the error, then try and recreate the error having applied the patch, the patch fixes. That may or may not be clear.
The text was updated successfully, but these errors were encountered: