aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Erb <s...@apache.org>
Subject Re: Review Request 43643: Do not materialize set inside DbTaskStore#fetchTasks
Date Wed, 17 Feb 2016 09:39:38 GMT

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


Ship it!




Great catch! One minor nitpick below.


src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java (line 567)
<https://reviews.apache.org/r/43643/#comment180803>

    Would you mind changing this test slightly and assert the number of items before you wrap
it in a set? This would allow us to catch duplicate elements without silently discarding those
in the set constructor.
    
    That's a rather unlikely scenario, but the impact would be quite severe.


- Stephan Erb


On Feb. 17, 2016, 4:42 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43643/
> -----------------------------------------------------------
> 
> (Updated Feb. 17, 2016, 4:42 a.m.)
> 
> 
> Review request for Aurora, John Sirois and Maxim Khutornenko.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The TaskStore interface requires an Interable to be returned. I have modified DbTaskStore
to take advantage of this and instead just return the List MyBatis populates.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/DbTaskStore.java b899d0f11ea499e40298ea9020414997c4527821

>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java dee34e29465d58adbc805cbb9c400e0328012ab8

> 
> Diff: https://reviews.apache.org/r/43643/diff/
> 
> 
> Testing
> -------
> 
> Master:
> Benchmark                                      (numTasks)   Mode  Cnt   Score   Error
 Units
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run       10000  thrpt    5  51.531 ± 7.236
 ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run       50000  thrpt    5   7.370 ± 1.320
 ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run      100000  thrpt    5   2.143 ± 1.234
 ops/s
> 
> This patch:
> Benchmark                                             (numTasks)   Mode  Cnt      Score
      Error  Units
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run              10000  thrpt    5  93344.488
± 21422.498  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run              50000  thrpt    5  70160.553
± 20418.670  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run             100000  thrpt    5  29834.284
± 10440.180  ops/s
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message