You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "James Clampffer (JIRA)" <ji...@apache.org> on 2016/04/19 22:07:25 UTC
[jira] [Created] (HDFS-10311) libhdfs++: DatanodeConnection::Cancel
should not delete the underlying socket
James Clampffer created HDFS-10311:
--------------------------------------
Summary: libhdfs++: DatanodeConnection::Cancel should not delete the underlying socket
Key: HDFS-10311
URL: https://issues.apache.org/jira/browse/HDFS-10311
Project: Hadoop HDFS
Issue Type: Sub-task
Reporter: James Clampffer
Assignee: James Clampffer
DataNodeConnectionImpl calls reset on the unique_ptr that references the underlying asio::tcp::socket. If this happens after the continuation pipeline checks the cancel state but before asio uses the socket it will segfault because unique_ptr::reset will explicitly change it's value to nullptr.
Cancel should only call shutdown() and close() on the socket but keep the instance of it alive. The socket can probably also be turned into a member of DataNodeConnectionImpl to get rid of the unique pointer and simplify things a bit.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)