-
Notifications
You must be signed in to change notification settings - Fork 5
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
deleting reaches: disabling symbology triggers leaves dead data in the database (reach_points etc) #485
Comments
If I delete just same reaches without disabling symbology triggers before, the reach_point are also deleted. What can we do, that we do not get dead data because of deleting records while the triggers are disabled? |
@cymed I think we have to clarify application triggers (which dispatch the data to the right places) with symbology triggers. Main difference being : application triggers can't be simply deactivated or only by a sys_admin knowing which operation can be operated when these are deactivated. |
@urskaufmann I think the performance issue is also a high priority point to assess, we made some performance assessment for QWAT at the time we implemented the TRIGGER / VIEW approach, there's no reason the edition performance should be so low as we have to disable application functionalities to make simple edition process. |
We do not have an instead of trigger on
|
We have to clearly define what is symbology and what is not. In QGEP the term symbology was already used but all of them where dropped and recreated before and after any upgrade task (and they were dropped, not only disabled). Which is now : We will then have two trigger functions types: Since both are on an application triggers. All of the triggers and rules affecting the datamodel should be documented somewhere to avoid any surprise behaviour. |
@3nids @domi4484
Could comment and evaluate what is proposed on #491 and what should be adapted to avoid such issues in the future? |
It needs to be a rule, because we only want to delete the channel if there are no other reaches with a fk on that channel. |
The general idea was to disable only symbology triggers (the ones doing an update that can be done anytime on the whole database) Theses triggers are often taking loops and stuff that can lead to performance issues when dealing with several features.
|
Potential improvements include
|
Describe the bug
open a new database prerelease 2024.03
import xtf organisation and data
Info: 1611 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Abwasserbauwerk_Text
Info: 2273 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Abwasserknoten
Info: 1535 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Deckel
Info: 90 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Einleitstelle
Info: 126 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Einstiegshilfe
Info: 2163 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Haltung
Info: 1519 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Haltung_Text
Info: 4326 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Haltungspunkt
Info: 2073 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Kanal
Info: 1809 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Normschacht
Info: 9 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Rohrprofil
Info: 25 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Spezialbauwerk
Info: 2 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Streichwehr
Info: 2 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Trockenwetterfallrohr
Info: 12 objects in CLASS DSS_2020_1_LV95.Siedlungsentwaesserung.Unterhalt
Watch this data in TWW
Important: disable symbology triggers (otherways it lasts hours)
delete all records in vw_tww_wastewater_structure (1924)
delete all records in vw_tww_reach (2163)
delete all records in vw_wastewater_node (371)
-> no more visible records in TWW
Conclusion: deleting in vw_tww_reach leaves dead data in classes reach_point, channel, networkelement and wastewater_structure
Expected behavior
all related data is also deleted.
Is this bug because of the disabled trigger?
Screenshots / data
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: