-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26232/#review55186
-----------------------------------------------------------



src/main/java/org/apache/aurora/scheduler/async/JobUpdateHistoryPruner.java
<https://reviews.apache.org/r/26232/#comment95572>

    I'm always nervous when important behavior is embedded in something 
seemingly-less-important like logging.  Can you extract a variable to separate 
the two?



src/main/java/org/apache/aurora/scheduler/storage/JobUpdateStore.java
<https://reviews.apache.org/r/26232/#comment95573>

    "...last completed updates that completed less than {@code 
historyPruneThreshold} ago.."



src/main/java/org/apache/aurora/scheduler/storage/JobUpdateStore.java
<https://reviews.apache.org/r/26232/#comment95574>

    Keep the value rich as far down as you can, to mitigate accidental misuse:
        Amount<Long, Time> historyPruneThreshold



src/main/java/org/apache/aurora/scheduler/storage/db/DBJobUpdateStore.java
<https://reviews.apache.org/r/26232/#comment95575>

    s/result/pruned/



src/main/java/org/apache/aurora/scheduler/storage/db/DBJobUpdateStore.java
<https://reviews.apache.org/r/26232/#comment95580>

    How would you feel about making the two pruning goals distinct at the 
mapper level?  Does that simplfiy anything?
    
    - get UUIDs of all updates older than pruneThreshold
    - get UUIDs of the the last >retainCount updates for each job
    - delete above UUIDs.
    
    I think i would find that easier to follow, at least.



src/main/java/org/apache/aurora/scheduler/storage/db/JobUpdateDetailsMapper.java
<https://reviews.apache.org/r/26232/#comment95576>

    Avoid repeating the method signature in text:
    s/Set of u/U/



src/main/java/org/apache/aurora/scheduler/storage/db/JobUpdateDetailsMapper.java
<https://reviews.apache.org/r/26232/#comment95578>

    s/Set of j/J/



src/main/java/org/apache/aurora/scheduler/storage/db/JobUpdateDetailsMapper.java
<https://reviews.apache.org/r/26232/#comment95579>

    How about `getPruneCandidates`?



src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java
<https://reviews.apache.org/r/26232/#comment95582>

    If this comment remains, please elaborate on why it is not strictly 
necessary. (i know, but a future developer might not.)



src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java
<https://reviews.apache.org/r/26232/#comment95581>

    Why this rather than an explicit delete record for the affected update 
UUIDs?



src/test/java/org/apache/aurora/scheduler/async/JobUpdateHistoryPrunerTest.java
<https://reviews.apache.org/r/26232/#comment95583>

    Can you take a stab at using FakeScheduledExecutor instead of a real 
thread?  I don't insist on it, but i'd like to see if that pattern works out in 
other situations.
    
    You'll have to modify FakeScheduledExecutor a bit to add support for 
`scheduleAtFixedRate`, but at that point all you should have to do in the test 
after `replay()` is
    
        clock.advance(pruneInterval);


- Bill Farner


On Oct. 2, 2014, 1:23 a.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26232/
> -----------------------------------------------------------
> 
> (Updated Oct. 2, 2014, 1:23 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Bill Farner.
> 
> 
> Bugs: AURORA-743
>     https://issues.apache.org/jira/browse/AURORA-743
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The pruner runs on periodic basis and trims completed updates up to the 
> guranteed per job retention count.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java 
> aa45d27391b1786ca3d5e8c928045f1b6f3cf5ef 
>   src/main/java/org/apache/aurora/scheduler/async/HistoryPruner.java 
> ebae58a04e8857c5f26d4b57c27dfcda9e14c82c 
>   src/main/java/org/apache/aurora/scheduler/async/JobUpdateHistoryPruner.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/JobUpdateStore.java 
> c3abffe575e801cebec3572cf4aceac83a238b55 
>   src/main/java/org/apache/aurora/scheduler/storage/db/DBJobUpdateStore.java 
> 3db0114c5432a5b7d0b01d97c75494be9e3e99a3 
>   
> src/main/java/org/apache/aurora/scheduler/storage/db/JobUpdateDetailsMapper.java
>  c583e085e0458835d51ebf740a3b5f01b428bb25 
>   
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 
> 66c91644677e7176ccf53dcfcf29a6792ec398bc 
>   
> src/main/resources/org/apache/aurora/scheduler/storage/db/JobUpdateDetailsMapper.xml
>  631ab2543dadb77b7fd1cae96adc9c0bd2f94b39 
>   src/main/thrift/org/apache/aurora/gen/storage.thrift 
> 7e502450f06abb449d06af09cc59185c6a9a2963 
>   src/test/java/org/apache/aurora/scheduler/async/HistoryPrunerTest.java 
> 011d9ec5d84c658c2b2e39bb0b3f9d20b5440cee 
>   
> src/test/java/org/apache/aurora/scheduler/async/JobUpdateHistoryPrunerTest.java
>  PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/storage/db/DBJobUpdateStoreTest.java
>  1b1160f349d64bbcd4d20103a82f3b8eb1ca75d9 
>   src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java 
> 68df0d542e41438c0844f76fc5b9ec6996a00e8d 
> 
> Diff: https://reviews.apache.org/r/26232/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew -Pq build
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>

Reply via email to