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
[fix] disable global restXQ trigger #4699
Conversation
Kudos, SonarCloud Quality Gate passed! |
As I previously stated to you @line-o in the public eXist-db Slack, I will not accept this change |
I know you wrote you were against it. As I was able to confirm in my testing, restxq is still an option for application developers as long as they set the trigger for the collections that contain actual handlers. So, I hope that I can convince users to just add it to where they need it. With the positive side effect for everyone that all other collections are no longer affected by the problems it introduces by being active everywhere. |
Here you have the chance to argue why this is still needed or what I have not thought about. Just not accepting it is a little shallow of an argument. |
Would you like me to copy and paste my points from Slack? |
Yes, please do so. |
Hi @adamretter, |
@adamretter in exist index configuration for a collection is taken from the collection.xconf for that collection, or when missing the one from the most close by parent collection.xconf . |
@line-o there is a test for docker using restxq. This will need to modified to either activate it by using a custom |
@duncdrum Yes I saw that. Maybe it helps to put in the extra effort to show that everything is still running fine afterwards and what needs to be adapted. |
@adamretter in Slack you wrote that the people who are not using restxq should simply disable it. Problem with this approach is imho that endusers will not know whats the cause of their issues and that they should search for "disabling restxq". They will notice heavy RAM usage only due to installing a XAR (and eXist-db not freeing the RAM afterwards, even when you trigger a GC via Monex). Or that the installation of frus takes 40min with a default eXist-db while it would take only 20min on the same machine with restxq disabled. In worst case they even step away from eXist-db without knowing that their issue could have simply been solved by disabling the restxq trigger. I would be all in for adding a "enable restxq" trigger to the app generator @duncdrum is maintaining and to add the information how and where to enable restxq prominent in the documentation but to disable it by default. |
My two cents from an eXist user… The argument of stepping away from exist… well I am using eXist for 8 years… Every time I have to work with it, I discover more and more bugs/mysterious problems/what so ever… we were used to problems… |
@StephanMa are you using restxq - annotating functions to route http traffic - or the REST-like API of exist?
This is about restxq and does not disable the REST-like API of exist. |
-> |
See #4855 (comment) |
#4855 is unrelated to this! |
Description:
This PR disables the restXQ trigger in collection.xconf.init. This is a breaking change as applications relying on this trigger to
be activated globally will have to add this trigger to their application's collection.xconf.
In my testing I was able to add two separate applications with both having the restXQ-trigger activated in their own
collection.xconf (both were based on https://gist.github.com/joewiz/28dd9b8454d14b4164a0). Modifying the code
showed up immediately when the exported routes were called with
/exist/restxq/{route}
.Reference:
This trigger has led to several severe problems in the past with heap-memory exceptions when installing XAR-packages and
hanging databases. There is also an unsolved issue with modules with circular dependencies.
Type of tests:
In order to replicate my test you can check out this PR, build it and then create one or more test-applications using the template below.