You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/04/13 02:43:00 UTC

[jira] [Commented] (KAFKA-9853) Improve performance of Log.fetchOffsetByTimestamp()

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

ASF GitHub Bot commented on KAFKA-9853:
---------------------------------------

ebolinger commented on pull request #8474: KAFKA-9853: Improve performance of Log.fetchOffsetByTimestamp
URL: https://github.com/apache/kafka/pull/8474
 
 
   The previous code did not use the collection produced by `takeWhile()`.  It only used the length of that collection to select the next element.
   Perhaps some people would consider this a MINOR change.  I created the JIRA ticket because this is part of the core library & probably warrants some discussion.
   
   This contribution is my original work and I license the work to the project under the project's open source license.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Improve performance of Log.fetchOffsetByTimestamp()
> ---------------------------------------------------
>
>                 Key: KAFKA-9853
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9853
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.10.2.2, 2.4.1
>            Reporter: Eric Bolinger
>            Priority: Minor
>              Labels: performance
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> This method inefficiently searches for the first element that meets a condition.  The temporary collection returned by `takeWhile()` method is not really used.  But rather the length is used as an offset into the original collection.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)