Skip to content
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 Message Export with queries having more than 10000 results #1566

Merged
merged 4 commits into from
Apr 10, 2018

Conversation

lorthirk
Copy link

@lorthirk lorthirk commented Apr 4, 2018

Hi all,

This PR aims at fixing #1534, so that the DataExportServlet doesn't crash anymore due to Elasticsearch result set limit to 10000 rows. However, in order to achieve this, we have to specify data sorting as Timestamp Ascendent, ignoring any other sort setting selected in the Data View.

While I was there I also fixed a couple of issues in the Data View (default sorting was not visible, sort by device id was not working) and refactored a bit exception displayed from REST APIs.

Claudio Mezzasalma added 4 commits April 5, 2018 11:33
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
In order to achieve this without overcoming Elasticsearch limits of 10000 results, more queries with 10000 row limit are aggregated. Due to this new behavior, data exported in XLS and CSV files are always sorted by Timestamp ascending, no matter the current view sort setting.

Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
@lorthirk lorthirk force-pushed the fix-datastore_limit_backend branch from 1a4e544 to e24298b Compare April 5, 2018 09:33
@codecov
Copy link

codecov bot commented Apr 5, 2018

Codecov Report

Merging #1566 into develop will increase coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1566      +/-   ##
=============================================
+ Coverage      53.61%   53.65%   +0.04%     
- Complexity      1454     1456       +2     
=============================================
  Files           1128     1128              
  Lines          26879    26879              
  Branches        2337     2337              
=============================================
+ Hits           14411    14423      +12     
+ Misses         11530    11520      -10     
+ Partials         938      936       -2
Impacted Files Coverage Δ Complexity Δ
...ce/datastore/internal/MessageStoreServiceImpl.java 53.19% <0%> (ø) 0 <0> (ø) ⬇️
...tastore/internal/mediator/DatastoreErrorCodes.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...pse/kapua/broker/core/pool/JmsConsumerWrapper.java 60% <0%> (-10%) 0% <0%> (ø)
...ranslator/kura/kapua/TranslatorKuraKapuaUtils.java 60% <0%> (+3.33%) 3% <0%> (+1%) ⬆️
...broker/core/converter/KapuaLifeCycleConverter.java 66.66% <0%> (+5.55%) 0% <0%> (ø) ⬇️
...ua/broker/core/listener/DeviceMessageListener.java 37.25% <0%> (+7.84%) 0% <0%> (ø) ⬇️
.../kura/kapua/TranslatorLifeDisconnectKuraKapua.java 92.59% <0%> (+29.62%) 7% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afcf1bd...e24298b. Read the comment docs.

@LeoNerdoG
Copy link
Contributor

@lorthirk I have checked this PR and it solves issue #1534. It can be merged when ready.

@Coduz Coduz merged commit 0c120da into develop Apr 10, 2018
@Coduz Coduz deleted the fix-datastore_limit_backend branch April 10, 2018 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants