[ 
https://issues.apache.org/jira/browse/HDFS-5746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13884886#comment-13884886
 ] 

Andrew Wang commented on HDFS-5746:
-----------------------------------

Thanks Colin, more comments:

* For the {{notificationSockets}} javadoc, I basically just wanted the 
explanation you gave: it's a socketpair, where the loop listens on 1, clients 
kick the loop by writing on 0.
* Can we verify the fix for racing {{sendCallback}} and {{toRemove}}? I think 
we need to check that the fd being removed is in {{entries}} before doing 
{{sendCallback}}. {{firstEntry}} also doesn't remove the entry from 
{{toRemove}}, so it looks like this inf loops. {{pollFirstEntry}} instead?
* Maybe {{remove()}} should also return a boolean "success" value too, rather 
than just swallowing an unknown socket.

Were these comments addressed?

{quote}
* Should doc that we only support one Handler per fd, it overwrites on add.
* Can add a Precondition check to make sure the lock is held in checkNotClosed
{quote}

ShortCircuitSharedMemorySegment:
* Flag constants would be more readable as "1<<63" and "1<<62" rather than 15 
zeroes (I did verify though :))
* Comment in Slot constructor talks about incrementing a refcount, but that's 
no longer happening there.
* No need to throw IOException in Slot constructor.
* Terminology: it seems like the "anchorable" flag means "is mlocked by DN and 
can increment the refcount" and "anchor" is a refcount for "using mlocked 
data". Renaming things would make this clearer, e.g. "lockable" for the flag, 
and then "lockcount" for the count. IMO, incrementing an anchor is not a great 
physical analogy :)
* How do we communicate the slot index between the DN and client? I see we keep 
the slot address, but what we need to pass to the client is an index. Maybe 
this is coming.

> add ShortCircuitSharedMemorySegment
> -----------------------------------
>
>                 Key: HDFS-5746
>                 URL: https://issues.apache.org/jira/browse/HDFS-5746
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, hdfs-client
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>             Fix For: 3.0.0
>
>         Attachments: HDFS-5746.001.patch, HDFS-5746.002.patch, 
> HDFS-5746.003.patch
>
>
> Add ShortCircuitSharedMemorySegment, which will be used to communicate 
> information between the datanode and the client about whether a replica is 
> mlocked.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to