Skip to content

Conversation

@johanneshiry
Copy link
Member

Resolves #247 and #248

@mia-krause in contrast to the existing implementation I keep the session open once it has been available to a InfluxDbConnector instead of creating a new on for each #getSession() call. . Based on the influxdb-java docs this is the recommended way to do. Reason for this is that the old implementation of #getSession() created a massive overhead when running concurrent writing operations as well as the application of the batch size was useless, bc for #persist(C entity) each session has been used exactly for one call and then closed.

I don't know if this breaks with one of your concepts but might you could provide some insights why you initially wanted to use a new session for each persist call?

@johanneshiry johanneshiry added bug Something isn't working invalid This doesn't seem right labels Nov 12, 2020
@johanneshiry johanneshiry added this to the Version 2.0 milestone Nov 12, 2020
@johanneshiry johanneshiry self-assigned this Nov 12, 2020
@johanneshiry johanneshiry force-pushed the jh/#248-fix-influxDbSink branch from 64297c7 to 0c42045 Compare November 12, 2020 07:52
@codecov
Copy link

codecov bot commented Nov 12, 2020

Codecov Report

Merging #249 (66be25a) into dev (f3040a9) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #249      +/-   ##
============================================
+ Coverage     77.81%   77.85%   +0.04%     
- Complexity     1900     1904       +4     
============================================
  Files           239      239              
  Lines          7738     7737       -1     
  Branches        743      743              
============================================
+ Hits           6021     6024       +3     
+ Misses         1289     1284       -5     
- Partials        428      429       +1     
Impacted Files Coverage Δ Complexity Δ
.../models/input/thermal/CylindricalStorageInput.java 71.05% <0.00%> (-2.64%) 10.00% <0.00%> (-1.00%)
...n/java/edu/ie3/datamodel/io/sink/InfluxDbSink.java 79.27% <0.00%> (+0.90%) 24.00% <0.00%> (+2.00%)
...ie3/datamodel/io/connectors/InfluxDbConnector.java 81.48% <0.00%> (+6.93%) 21.00% <0.00%> (+4.00%)

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 d2e2894...66be25a. Read the comment docs.

@johanneshiry
Copy link
Member Author

!test

2 similar comments
@johanneshiry
Copy link
Member Author

!test

@johanneshiry
Copy link
Member Author

!test

mia-krause
mia-krause previously approved these changes Nov 18, 2020
@johanneshiry
Copy link
Member Author

!test

@johanneshiry johanneshiry merged commit 223eec4 into dev Nov 18, 2020
@johanneshiry johanneshiry deleted the jh/#248-fix-influxDbSink branch November 18, 2020 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InfluxDbSink throws NPE

3 participants