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
Cassandra refactor #1847
Cassandra refactor #1847
Conversation
0d65711
to
d13c4f7
Compare
Codecov Report
@@ Coverage Diff @@
## master #1847 +/- ##
=========================================
+ Coverage 74.6% 74.7% +0.09%
=========================================
Files 298 298
Lines 27957 28096 +139
=========================================
+ Hits 20858 20988 +130
- Misses 7099 7108 +9
Continue to review full report at Codecov.
|
40d2706
to
47eb5fe
Compare
47eb5fe
to
0444028
Compare
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.
I like the refactor in general, although it brings some questionable indentation changes (not because we care very much, but because some changes consist mostly of whitespace diff from the fine Emacs indentation style).
One point that I'd like to see addressed though - have you considered using https://github.com/inaka/worker_pool instead of extending the custom pooling solution?
@kzemek Actually, no, I haven't considered using I'll reformat the code with emacs, I have no idea when and how the code got reformatted. Also, I'll look into the viability of using |
@kzemek I have reformatted the code with emacs, but introducing |
e8f3cb4
to
6539c36
Compare
bf1197e
to
22c4e81
Compare
22c4e81
to
ed49eb7
Compare
This PR introduces new implementation of
mongoose_cassandra
. There are no changes to the API, so the code that uses Cassandra remains unchanged.The new implementation of Cassandra layer moves all request processing to a worker pool (previously only asynchronous requests were handled this way). This reduces code duplication and improves error handling while also fixes some race conditions that were present in previous implementation.
This PR also adds
mongoose_cassandra_SUITE
that has some simple "cassandra-only" tests formongoose_cassandra
API. This test suite requires a TCP proxy to be active on top of Cassandra (to enable to connection manipulations like connection drop or connection latency).