> On Oct. 14, 2014, 6:27 a.m., Joel Koshy wrote: > > core/src/main/scala/kafka/log/Log.scala, line 515 > > <https://reviews.apache.org/r/26663/diff/1/?file=719793#file719793line515> > > > > Although this should work I'm wondering if it would be better to > > recompute a random jitter for each new rolled segment. What do you think? > > Neha Narkhede wrote: > Only one segment should ever roll at one time in a log. So this should > suffice right? > > Joel Koshy wrote: > Yes, but there could be one segment each from multiple low-volume logs > that roll simultaneously - which is why we want to add the jitter. The > current patch should work - it's just that the jitter is set only once (up > front) per log when the log is created. It does not seem there is any > randomness after that. That should be okay, but if you are unlucky and get a > roll schedule that isn't spread out very well that schedule will stick. > > Neha Narkhede wrote: > Even for low volume logs, as long as every log as a random jitter, it > seems unlikely that time based rolling of log segments would align across > logs. For that sort of alignment, two logs would have to have the same jitter > set.
Actually, ignore what I said. the config.randomSegmentJitter() actually recomputes a random jitter time for every log segment. So no 2 segments should reasonably roll at the same time. - Neha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26663/#review56494 ----------------------------------------------------------- On Oct. 13, 2014, 11:16 p.m., Ewen Cheslack-Postava wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26663/ > ----------------------------------------------------------- > > (Updated Oct. 13, 2014, 11:16 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-979 > https://issues.apache.org/jira/browse/KAFKA-979 > > > Repository: kafka > > > Description > ------- > > KAFKA-979 Add optional random jitter for time based log rolling. > > > Diffs > ----- > > core/src/main/scala/kafka/log/Log.scala > a123cdc52f341a802b3e4bfeb29a6154332e5f73 > core/src/main/scala/kafka/log/LogCleaner.scala > c20de4ad4734c0bd83c5954fdb29464a27b91dff > core/src/main/scala/kafka/log/LogConfig.scala > d2cc9e3d6b7a4fd24516d164eb3673e6ce052129 > core/src/main/scala/kafka/log/LogSegment.scala > 7597d309f37a0b3756381f9500100ef763d466ba > core/src/main/scala/kafka/server/KafkaConfig.scala > 7fcbc16da898623b03659c803e2a20c7d1bd1011 > core/src/main/scala/kafka/server/KafkaServer.scala > 3e9e91f2b456bbdeb3055d571e18ffea8675b4bf > core/src/test/scala/unit/kafka/log/LogSegmentTest.scala > 7b97e6a80753a770ac094e101c653193dec67e68 > core/src/test/scala/unit/kafka/log/LogTest.scala > a0cbd3bbbeeabae12caa6b41aec31a8f5dfd034b > > Diff: https://reviews.apache.org/r/26663/diff/ > > > Testing > ------- > > > Thanks, > > Ewen Cheslack-Postava > >