[ 
https://issues.apache.org/jira/browse/KAFKA-1042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jun Rao reopened KAFKA-1042:
----------------------------


Trunk has a compilation error after this patch is checked in. 

[error] 
/Users/jrao/Intellij/kafka_git/core/src/main/scala/kafka/log/Log.scala:604: 
type mismatch;
[error]  found   : java.lang.Long
[error]  required: scala.Long
[error]         asIterable(segments.subMap(floor, true, to, false).values)

I am actually a bit confused on how the output of methods like 
ConcurrentSkipListMap.floorKey() (which can be null) is converted from the java 
land to the scala land. Javap shows the following signature for logSegments(), 
which takes primitive long as input.
    public scala.collection.Iterable logSegments(long, long);

However, we feed into logSegements() the output from floorKey(), which can be 
null. It seems that the null value is somehow lost during the translation?

> Fix segment flush logic
> -----------------------
>
>                 Key: KAFKA-1042
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1042
>             Project: Kafka
>          Issue Type: Improvement
>          Components: log
>    Affects Versions: 0.8.1
>         Environment: centos6.4
>            Reporter: Joris Van Remoortere
>            Assignee: Jay Kreps
>            Priority: Critical
>              Labels: patch
>         Attachments: flush_segment_fix-v1.patch, KAFKA-1042-v2.patch
>
>
> The logic for deciding which segments to flush in log.flush() was missing the 
> case where the (from, to) range was within a single segment. This case 
> enables some of the features in the server.properties file such as message 
> volume / time based triggers for fsync on the log files.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to