Skip to content
Snippets Groups Projects
  1. Nov 07, 2012
    • Iustin Pop's avatar
      Fix compatibility with newer Haskell libraries · 1251817b
      Iustin Pop authored
      
      This small patch fixes compatibility with a few newer Haskell libraries:
      
      - base 4.6, included with ghc 7.6, removed the deprecated 'catch'
        function from Prelude, so our "import Prelude hiding (catch)" is now
        an error; we workaround by using fully-qualified
        Control.Exception.catch name
      
      - containers 0.5 changed the signature of 'deleteFindMax'; we
        workaround by using separate 'findMax' and 'deleteMax'
      
      - QuickCheck 2.5 removed the 'maxDiscards' test parameter, replacing
        it with a much better 'maxDiscardsRatio'; however, until we can
        depend on that, we workaround by just removing it (we don't control
        anymore the maxDiscards, instead leaving it default; for our default
        test size, this is no change, as the default value is already 500,
        which is our default as well) and not printing it anymore
      
      Tested on Squeeze (+extra libs), Wheezy and experimental, which covers
      all supported GHC versions.
      
      Also, merging this in master will be a pain, but unless we want to
      stop supporting 2.6…
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      1251817b
  2. Sep 07, 2012
    • Iustin Pop's avatar
      Fix bug in non-mirrored instance allocation · 14b5d45f
      Iustin Pop authored
      
      The function `allocateOnSingle' has a bug in the calculation of the
      cluster score used for deciding which of the many target nodes to use
      in placing the instance: it uses the original node list for the score
      calculation.
      
      Due to this, since the original node list is the same for all target
      nodes, it means that basically `allocateOnSingle' returns the same
      score, no matter the target node, and hence the choosing of the node
      is arbitrary, instead of being done on the basis of the algorithm.
      
      This has gone uncaught until reported because the unittests only test
      1 allocation at a time on an empty cluster, and do not check the
      consistency of the score. I'll send separate patches on the master
      branch for adding more checks to prevent this in the future.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
      14b5d45f
  3. Jul 27, 2012
  4. Jul 19, 2012
  5. Jun 29, 2012
  6. Jun 28, 2012
  7. Jun 27, 2012
  8. Jun 25, 2012
  9. Jun 19, 2012
    • Iustin Pop's avatar
      Fix corner case in quick-check generated tests · 232fc505
      Iustin Pop authored
      
      Thanks to Agata Murawska, a random seed that generates bad test cases
      was found ("seed was 1768143307 2118231514, test size 74"). This is
      due to the fact that some nodes were generated with tMem=0, fMem=0,
      which means that pMem was NaN and thus the node was not comparing
      equal to itself.
      
      Worked around by limiting the test case generation to nodes with
      positive values; a better fix would be to compare nodes differently
      (subset of properties or ignore NaN values).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      232fc505
  10. Jun 08, 2012
  11. May 29, 2012
  12. May 08, 2012
Loading