This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 296
Replace QPF with QueryExecution mockable module #1579
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Kitsu <[email protected]>
l4l
added
needs-review
pr awaits review from maintainers
query
All that relates to the iroha querying
labels
Jul 19, 2018
kamilsa
reviewed
Jul 20, 2018
irohad/execution/query_execution.hpp
Outdated
} // namespace shared_model | ||
#include "interfaces/queries/blocks_query.hpp" | ||
#include "interfaces/queries/query.hpp" | ||
#include "interfaces/query_responses/query_response.hpp" |
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.
Forward declaration?
kamilsa
approved these changes
Jul 20, 2018
lebdron
previously requested changes
Jul 20, 2018
|
||
std::shared_ptr<ametsuchi::WsvQuery> wsvQuery_; | ||
std::shared_ptr<ametsuchi::BlockQuery> blockQuery_; | ||
std::mutex m; |
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.
One of the reasons to introduce connection pool and SOCI was to remove locks. Please remove the mutex and use a unique connection for each query from the client.
Signed-off-by: Kitsu <[email protected]>
Signed-off-by: Kitsu <[email protected]>
Signed-off-by: Kitsu <[email protected]>
SonarQube analysis reported 6 issues
|
vdrobnyi
approved these changes
Jul 23, 2018
l4l
added a commit
that referenced
this pull request
Jul 25, 2018
Signed-off-by: Kitsu <[email protected]>
l4l
added a commit
that referenced
this pull request
Jul 25, 2018
Signed-off-by: Kitsu <[email protected]>
l4l
added a commit
that referenced
this pull request
Jul 25, 2018
Signed-off-by: Kitsu <[email protected]>
l4l
added a commit
that referenced
this pull request
Jul 25, 2018
Signed-off-by: Kitsu <[email protected]>
l4l
added a commit
that referenced
this pull request
Jul 25, 2018
Signed-off-by: Kitsu <[email protected]>
l4l
added a commit
that referenced
this pull request
Jul 25, 2018
Signed-off-by: Kitsu <[email protected]>
l4l
added a commit
that referenced
this pull request
Jul 25, 2018
Signed-off-by: Kitsu <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description of the Change
QueryProcessingFactory cannot be replaced with other module, thus require more awful tests. It was replaced with QueryExecution interface and QueryExecutionImpl class (just copied previous implementation)
Benefits
QueryExecution can be mocked, simpler tests, fuzzing test are fixed (also find_fuzz is now correct)
Possible Drawbacks
Explicit mutex lock on each query