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

ASF GitHub Bot commented on TS-4635:
------------------------------------

Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/788
  
    Hmmm, this code looks overly complicated already to begin with :-/. Why is 
RefCountCacheSerializer a template class? It's tightly coupled with HostDB it 
seems, and is only used to contain HostDBInfo?
    
    If we are going to clean this up, I'd strongly suggest not using templates 
just because. I know this isn't your fault James (in any way), and you are 
trying to make it better, but this is not good.
    
    That much said, I'm ok with the refactoring, it's making it a bit better 
(but I still don't like this :). As someone smart said, this is premature 
generalization.


> fix HostDB file descriptor handling
> -----------------------------------
>
>                 Key: TS-4635
>                 URL: https://issues.apache.org/jira/browse/TS-4635
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HostDB
>            Reporter: James Peach
>            Assignee: James Peach
>             Fix For: 7.0
>
>
> Various file descriptor handling bugs syncing HostDB.
> 1. RefCountCacheSerializer::fd is initialized to 0 rather than -1
> 2. RefCountCacheSerializer::initialize_storage checks for fd <= 0 rather than 
> -1
> 3. Any time the RefCountCacheSerializer is deleted it leaks the file 
> descripto.
> 4. Leaks on error paths in RefCountCacheSerializer::finalize_sync()
> There is a fd leak somewhere:
> {noformat}
> [ET_NET 23444 nmadmin   32u   REG              202,1         12   524318 
> /n/trafficserver/var/host.db.syncing
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to