-
-
Notifications
You must be signed in to change notification settings - Fork 189
Cleanup and refactoring of REST Server #549
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
Conversation
adamretter
commented
Mar 31, 2015
- Much cleanup and removal of duplicated code.
- Easier to read code.
- Fixed several black-hole bugs.
- Made parameter handling consistent between http methods.
- Made error handling in the REST interface consistent and correct.
|
Looks good..... |
|
@dizzzz Does that mean you will merge it? |
|
Looks good, but I have not had the time to test it yet. |
|
@adamretter we are a bit slow with pulling in PRs, since changes in 'essential' or 'core' areas need to be verifyied thoroughly (enough). I certainly do NOT want to slow down development, input from fellow devs like "looks good to me" (review) certainly helps to know who has looked into a PR. I feel though that we need some talks -skype/hangout/...- to align who/how/when/what is pulled in, what is the criterium. I fear that running the unit-tests is an essential step but not sufficient. But... what is then sufficient? |
|
@dizzzz Okay. I would like to get an idea if the next version is 2.3 or 3.0, certainly I have another 6 potential pull-requests stacked up on top of the ones I have sent. Some of them would be more suitable for a 3.0 as they are the removal of deprecated features. My personal feeling is the next version should be a 3.0, due to several things, but the major non-backwards change is the switch to Java 8. Just let me know when you want to Skype? Regards the unit tests, if you can't trust our test-suite then we need more tests! |
|
Testing in a live system with additional extensions and xars enabled, using other than default configuration and with legacy or at least current production code I would say is preferred for central components like this on top of unit testing. So closer to integration/delivery/acceptance. |
|
@ljo But your live system is different to anyone else's live system, so it is not a repeatable test. For example none of my live systems use xars! Instead when issues are found by someone that are not covered by the test suite, then tests should be added, otherwise regressions are inevitable. |
|
@adamretter yes, they should of course be fed back as unit tests. But to get a broad spectrum probe testing it in any one live system could add some insights even if not repeatable. This was mainly for @dizzzz on what could be done in addition. And I just said it was a preferred addition. |
|
@ljo okie doke. |
|
Just for explanation: I test every pull request (or set thereof) which may affect core performance against two or three apps using a data set of around 20 gb. I mainly concentrate on install/upload performance, selected queries, memory consumption. This costs some time (about 2 to 3 hours), but gives me some confidence, in particular concerning memory leaks. I'm currently running the test for Adam's last PRs and I'm happy if Leif does the same. Now that at least one of the data sets is actually in the public domain, I'd like to automate this type of load testing. I would welcome a skype chat, also to coordinate preparations for the next release. There are still a lot of bugs to be addressed. How about tomorrow or Thursday evening? |
|
Wednesday would be fine, thursday is not possible for me....
|
|
@wolfgangmm Anytime is fine for me. I would also like to see those tests automated :-) |
|
I just got a meeting moved to tomorrow evening, but let me know the time. From 20.30 CEST I will be available. |
|
Ok, so let's say 20:30 CEST tomorrow. I'll send a hangout link. |
|
any time is fine for me |
|
Ok, great. |
|
I was getting a deadlock after applying this PR to my test system. Investigating ... |
|
@wolfgangmm Okay very interesting. Let me know what you find... |
|
The deadlock occurs because withCollection keeps a lock on the collection of the main query while parsing it. Import statements need to lock other resources in order to check their validity, so the collection should not remain locked. As always, reproducing a deadlock depends on the exact timing, but it happens quite easily on my machine by hitting reload on the dashboard a few times. |
|
Think that must be done outside synchronized block and borrowCompiledXQuery should be none synchronized |
|
Thanks @wolfgangmm I will take a look at this in the next 2 days or so (playing with transactions at the moment) and also check @shabanovd suggestion. |
b76a807 to
9439e6e
Compare
|
@adamretter with new interest in the REST api from @eXist-db/tools maybe its a good time to rebase this for the next RC? |
|
So…? |
|
It is unlikely I will revive this for eXist-db. FusionDB will have a new http server to replace this. Unless anyone wants to continue this work, I suggest we close the PR |
|
well @line-o and i talked about update to REST, @adamretter could you rebase this, so we see where its at? |
|
@duncdrum sorry, rebasing this requires resolving a lot of merge conflicts. Someone else is welcome to do so though... |
|
@adamretter We would need to understand the changes and concepts behind this, in order to be able to do revive development. What are the expected benefits that would justify this? |
|
@line-o there are as laid out in the bullet points at the top of this PR. |
|
I won't be developing this further. If someone else wishes to continue with it, please feel free. |