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

datastore driver - adding reconnect to datastore capabilities #2969

Merged
merged 1 commit into from
May 14, 2020

Conversation

riccardomodanese
Copy link
Contributor

Signed-off-by: riccardomodanese riccardo.modanese@eurotech.com
There is no way to start the broker if ElasticSearch is down at startup. The broker is expected to start even if ES is down. The connection with the data-store should be tried periodically, until it has been established

Related Issue
none

Description of the solution adopted
No exception is thrown if an error occurred when establishing the data-store connection. A connection task is then executed periodically until the connection is established.

Screenshots
none

Any side note on the changes made
none

@riccardomodanese riccardomodanese added the Enhancement This PR/Issue improves an part of Kapua label May 11, 2020
@riccardomodanese riccardomodanese force-pushed the fix-datastoreClientReconnection branch from 9bffe33 to bf9734c Compare May 11, 2020 08:27
@riccardomodanese
Copy link
Contributor Author

Note:
Since the Elastisearch transport client is deprecated since a while and it will be removed soon, the deprecated tag is added to the Kapua transport datastore client objects (the rest client should be used instead).
For this reason the changes of this pr are affecting only the Rest client. The transport client behavior remains at it was before.

@codecov
Copy link

codecov bot commented May 11, 2020

Codecov Report

Merging #2969 into develop will increase coverage by 0.38%.
The diff coverage is 47.45%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2969      +/-   ##
=============================================
+ Coverage      56.19%   56.58%   +0.38%     
- Complexity      2591     2601      +10     
=============================================
  Files           1061     1061              
  Lines          23002    22938      -64     
  Branches        2064     2043      -21     
=============================================
+ Hits           12926    12979      +53     
+ Misses          9123     9013     -110     
+ Partials         953      946       -7     
Impacted Files Coverage Δ Complexity Δ
...re/client/transport/EsTransportClientProvider.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ore/client/transport/TransportDatastoreClient.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...service/datastore/internal/MessageStoreFacade.java 49.10% <ø> (ø) 16.00 <0.00> (ø)
...astore/internal/client/DatastoreClientFactory.java 48.27% <ø> (ø) 3.00 <0.00> (ø)
...ce/datastore/client/rest/EsRestClientProvider.java 30.63% <54.28%> (+5.10%) 17.00 <4.00> (+4.00)
...ice/datastore/client/rest/RestDatastoreClient.java 68.40% <94.59%> (+6.94%) 60.00 <28.00> (-3.00) ⬆️
...rvice/datastore/client/rest/ClientSettingsKey.java 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
.../jbatch/persistence/JPAPersistenceManagerImpl.java 31.60% <0.00%> (+1.03%) 30.00% <0.00%> (ø%)
...apua/job/engine/jbatch/JobEngineServiceJbatch.java 51.85% <0.00%> (+1.85%) 8.00% <0.00%> (ø%)
... and 12 more

Signed-off-by: riccardomodanese <riccardo.modanese@eurotech.com>
@lorthirk lorthirk force-pushed the fix-datastoreClientReconnection branch from bf9734c to f140140 Compare May 11, 2020 12:35
@Coduz Coduz merged commit c40064b into develop May 14, 2020
@Coduz Coduz deleted the fix-datastoreClientReconnection branch May 14, 2020 12:07
@Coduz Coduz mentioned this pull request May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants