Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # dev >> Re: Review Request 23266: Fix KAFKA-1515

Copy link to this message
Re: Review Request 23266: Fix KAFKA-1515

This is an automatically generated e-mail. To reply, visit:
Three very minor issues:
1. It would be good to use a while loop when checking the condition in forceUpdate() (http://stackoverflow.com/questions/2536692/a-simple-scenario-using-wait-and-notify-in-java). In this case what you have actually works because the forceUpdate() method itself is called in a loop, but it would be better if forceUpdate() guaranteed its own postcondition.
2. It would be good to think through the case where a metadata request takes less than 1ms, as the avg. roundtrip I see is about .4 ms. This should not lead to waiting for maxWait if possible. One approach to this would be to use a logical version number. Another would be to have forceUpdate(long time) ensure that the metadata is at least as fresh as the given time. I think either would work.
3. Maybe awaitUpdate(int desiredVerison, long now) would be a better name?

- Jay Kreps
On July 7, 2014, 5:55 p.m., Guozhang Wang wrote: