-
Notifications
You must be signed in to change notification settings - Fork 31
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
Move label values json aggregation into Java #1977
Conversation
As expected these tests are failing: Error: Failures:
Error: TestServiceTest.labelValuesFilterMultiSelectBoolean:582 1 expectation failed.
Expected status code <200> but was <500>.
Error: TestServiceTest.labelValuesFilterMultiSelectNumber:555 1 expectation failed.
Expected status code <200> but was <500>.
Error: TestServiceTest.labelValuesFilterMultiSelectStrings:528 1 expectation failed.
Expected status code <200> but was <500>. |
e46a7e9
to
d418e68
Compare
With the latest 2 commits I did:
There are still some TODOs:
|
446a978
to
3b83904
Compare
@willr3 @johnaohara I am not fully satisified about the dirty trick I had to do in order to decompose the jsonpath for the jsonpath filter but it looks working. I did some other performance comparions between current master branch and this PR, I attached the main important ones here 👉 https://issues.redhat.com/browse/MPL-455. I am still a bit surprised about the x10 improvement in the case of filter obj (I'd like to investigate a bit more to ensure the response is actually the same - it was in my local env). Anyway, I think this PR is ready for review and it comes with good improvements IMO but happy to get any feedback! [edit] I kept different commits to highlight the different changes, I will squash them before merging if no other changes are required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@willr3 do you want to review this PR, looks good to me, but would be good to get a 2nd opinion as it is a big change to labelvalues |
taking a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only part we need to clarify at the moment is if this change still works with jsonpaths that start with a full depth search (e.g. $..name
). If it does not then we need to prevent those from being used and return an appropriate error
3b83904
to
5f2afbb
Compare
This comment was marked as resolved.
This comment was marked as resolved.
5f2afbb
to
7a1124d
Compare
Fixed now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just went to merge this PR, but realised that there is an implementation detail leaking from the API classes. I think we should fix that before merging
I was double checking that no API changes were required so that it could be back-ported
horreum-api/src/main/java/io/hyperfoil/tools/horreum/api/data/ExportedLabelValues.java
Outdated
Show resolved
Hide resolved
@lampajr thanks for sorting the api issue, please squash commits and I will merge |
Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
19a080d
to
ec99ac2
Compare
Here we go, commits squashed @johnaohara 🚀 |
Changes proposed
I am proposing to move part of the
/labelValues
logic from jdbc to Java, especially the json aggregation.This seems coming with a huge improvement, here some results I obtained:
Starting from empty db
Before
After
With prod backup and huge response (~100MB)
Before
After
Open points
filter
andmultiFilter
does not work anymore as we don't have the whole object in the query anymore.. therefore we should think how we can fix that.Fix ordering by labelsAs agreed this won't be supported any longerCheck List (Check all the applicable boxes)