https://github.com/voldemort/voldemort
Revision f83442d4e47b3518e9499168633bd19baca7a047 authored by Arunachalam Thirupathi on 24 October 2015, 01:55:18 UTC, committed by Arunachalam Thirupathi on 27 October 2015, 21:56:42 UTC
When Server grace fully closes a connection, client ignores the
connection close. After this an operation that gets this connection
fails with EOFException as read/write returns -1 which causes the
operation to fail. Mostly this is fine as the backup operation generaly
succeeds, but when a cluster is bounced due to upgrade or other reasons,
and if a client ends up caching all dead connections, it causes the
operation to fail.

After a client operation is done, previously the socket is registered
with the selector for no-intention. For the next operation we start with
write.

With this change, the socket will be left in read mode. So FIN packet
from the server will be processed and the socket will be closed. Any
connection checkout from the pool needs to validate the connection.
There is a race condition as the returned connection from the cache
could still be killed later, that is handled as well.

Stream processors must be closed after the socket is closed.
Client will not be able to handle these close messages correctly.

Added more comments to the Client Request Executor.

Tests for dead connection clearing
1 parent 9c87ad8
History
Tip revision: f83442d4e47b3518e9499168633bd19baca7a047 authored by Arunachalam Thirupathi on 24 October 2015, 01:55:18 UTC
Client do not remove dead connections
Tip revision: f83442d
File Mode Size
.settings
bin
clients
config
contrib
docs
example
gradle
private-lib
src
test
voldemort-contrib
.gitignore -rw-r--r-- 242 bytes
CONTRIBUTORS -rw-r--r-- 659 bytes
LICENSE -rw-r--r-- 11.1 KB
NOTES -rw-r--r-- 2.5 KB
NOTICE -rw-r--r-- 8.1 KB
README.md -rw-r--r-- 4.4 KB
build.gradle -rw-r--r-- 20.0 KB
build.xml -rw-r--r-- 1.7 KB
gradle.properties -rw-r--r-- 1.1 KB
gradlew -rwxr-xr-x 5.0 KB
gradlew.bat -rw-r--r-- 2.3 KB
release_notes.txt -rw-r--r-- 45.7 KB
settings.gradle -rw-r--r-- 149 bytes
tomcat-tasks.properties -rw-r--r-- 420 bytes
web.xml -rw-r--r-- 1.1 KB

README.md

back to top