Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Check connection status #72

Merged
merged 6 commits into from
Aug 2, 2018
Merged

Check connection status #72

merged 6 commits into from
Aug 2, 2018

Conversation

jhecking
Copy link
Contributor

@jhecking jhecking commented Aug 1, 2018

Check whether server connections are alive before returning them from the connection pool. If the server closed the connection, e.g. due to proto-fd-idle-ms limit being reached, the connection is removed from the pool and, if necessary, a new connection is established.

If the server is hard killed, or the connection is closed for other reasons, it may not be possible for the client to detect this, and an Aerospike::Exception::Connection error may still be raised.

Resolves #67.

@jhecking jhecking added this to the v2.8 milestone Aug 1, 2018
@jhecking jhecking self-assigned this Aug 1, 2018
@codecov-io
Copy link

codecov-io commented Aug 1, 2018

Codecov Report

Merging #72 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #72      +/-   ##
==========================================
- Coverage   95.59%   95.59%   -0.01%     
==========================================
  Files         153      155       +2     
  Lines        9974    10054      +80     
==========================================
+ Hits         9535     9611      +76     
- Misses        439      443       +4
Impacted Files Coverage Δ
lib/aerospike/key.rb 100% <ø> (ø) ⬆️
lib/aerospike/utils/packer.rb 100% <100%> (ø) ⬆️
lib/aerospike/utils/unpacker.rb 100% <100%> (ø) ⬆️
lib/aerospike.rb 100% <100%> (ø) ⬆️
lib/aerospike/utils/buffer.rb 95.08% <100%> (ø) ⬆️
lib/aerospike/utils/connection_pool.rb 100% <100%> (ø)
spec/aerospike/util/connection_pool_spec.rb 100% <100%> (ø)
lib/aerospike/socket/base.rb 87.5% <100%> (+0.46%) ⬆️
lib/aerospike/node.rb 100% <100%> (ø) ⬆️
lib/aerospike/cluster.rb 93.4% <100%> (-0.22%) ⬇️
... and 6 more

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 c76e3f0...699a1d3. Read the comment docs.

@jhecking jhecking removed the bug label Aug 2, 2018
@jhecking jhecking merged commit 249e79c into master Aug 2, 2018
@jhecking jhecking deleted the check-conn-alive branch August 2, 2018 09:42
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aerospike::Exceptions::Connection: Errors
2 participants