Open
Conversation
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
Add some tests for computation cancel requests Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
…status remain when error occur' Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
5594bdc to
2ee713b
Compare
jonenst
reviewed
Mar 17, 2021
| Mono<List<Network>> otherNetworks = Flux.fromIterable(otherNetworkUuids) | ||
| .flatMap(this::getNetwork) | ||
| .flatMap(uuid -> { | ||
| if (resultUuid != null && cancelComputationRequests.get(resultUuid) != null) { |
Contributor
There was a problem hiding this comment.
actually all these are done in parallel so can you remove this check which is not useful ? sorry for asking to add it
jonenst
reviewed
Mar 17, 2021
| return Mono.empty(); | ||
| } | ||
|
|
||
| LOGGER.info("Loading networks"); |
Contributor
There was a problem hiding this comment.
The logs should happen when the operation is performed, not when the mono is created. There is the same problem for other log statements in this code, we should fix them all
jonenst
reviewed
Mar 17, 2021
|
|
||
| Mono<Network> network = getNetwork(context.getNetworkUuid(), context.getOtherNetworkUuids(), resultUuid); | ||
|
|
||
| if (resultUuid != null && cancelComputationRequests.get(resultUuid) != null) { |
Contributor
There was a problem hiding this comment.
this "if" happens almost at the same time as the previous one, it's not needed
jonenst
reviewed
Mar 17, 2021
| futures.put(resultUuid, future); | ||
| } | ||
| if (resultUuid != null && cancelComputationRequests.get(resultUuid) != null) { | ||
| return Mono.empty(); |
Contributor
There was a problem hiding this comment.
I think we should add a log to all the short circuit returns because without it, the log will look like this:
Run security analysis on contingency lists: ...
loading resource network
loading resource ...
cancelling
... tons of network-store-client logs because the operation continues...
...and nothing here to remind us that we didn't run the security analysis
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
|
Kudos, SonarCloud Quality Gate passed! |
and conflicts resolution Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
Resolving conflicts Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com> # Conflicts: # src/main/java/org/gridsuite/securityanalysis/server/service/SecurityAnalysisService.java # src/main/java/org/gridsuite/securityanalysis/server/service/SecurityAnalysisWorkerService.java
|
Kudos, SonarCloud Quality Gate passed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.