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

ASF GitHub Bot commented on ZOOKEEPER-2932:
-------------------------------------------

Github user afine commented on the issue:

    https://github.com/apache/zookeeper/pull/414
  
    I got curious and took a look, it seems like this is related to 
`sortDataDir` and the way it handles files that have a different "prefix" than 
what is passed in. 
    ```
        * @param prefix files not matching this prefix are assumed to have a
        * version = -1)
    ```
    
    Not sure what the best way to handle this would be. I think throwing in a 
check while iterating getLogFiles may be the simplest way to go. Maybe you 
could think of something cleaner.


> Performance enhancement about purging task
> ------------------------------------------
>
>                 Key: ZOOKEEPER-2932
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2932
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.4.10, 3.5.3
>            Reporter: OuYang Liang
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The method FileTxnLog.getLogFiles is used to find out the target log files to 
> be retained base on the given zxid when purging task is running. The current 
> implementation of this method is trivial to understand, and iterate the log 
> files twice to achieve its purchase. It could be improved from both 
> performance and readability.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to