-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve B/R procedures #10792
Comments
@Cornacap we just talked about the wonkiness of B/R, maybe this will solve your issue? |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@Cornacap the restore procedure performs these steps:
The backup of the target system is a safety step: if the restore procedure fails, it tries to restore the last known data in the system; if this step should fail, you still have the old data stored somewhere. Anyway, the restore procedure should give you a detailed log of what's happening, in order to make it possible a post-mortem investigation. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
* Improve B/R procedures * fix formatting of geoserver error message * Fix black formatting * Fix PEP wanrings --------- Co-authored-by: Alessio Fabiani <alessio.fabiani@geosolutionsgroup.com>
In the B/R code there are many points that may be improved, since they could lead to random issues.
Tables could be retrieved in a single step, closing the connection as soon as the needed data is retrieved:
geonode/geonode/br/management/commands/utils/utils.py
Lines 254 to 293 in e66877a
The tables are dumped in binary format, so it is dependent on the PG version, and furthermore files can not be easily inspected:
geonode/geonode/br/management/commands/utils/utils.py
Lines 282 to 283 in e66877a
Transaction controls are badly implemented: if an operation fails, all the subsequand ones are automatically skipped by the dbms, so the commit/rollaback should be placed inside the loop:
geonode/geonode/br/management/commands/utils/utils.py
Lines 300 to 343 in e66877a
When dealing with tables, if tables are in different schemas the procedure may break
Password are visibile in the process list since they are part of the command line:
geonode/geonode/br/management/commands/utils/utils.py
Line 282 in e66877a
Logging
print
instead of loggingGWC layers are not recreated
Specifications
The text was updated successfully, but these errors were encountered: