1. 26 Sep, 2011 2 commits
  2. 24 Sep, 2011 1 commit
  3. 23 Sep, 2011 3 commits
  4. 22 Sep, 2011 2 commits
  5. 20 Sep, 2011 1 commit
  6. 12 Sep, 2011 7 commits
  7. 09 Sep, 2011 1 commit
  8. 05 Sep, 2011 6 commits
  9. 02 Sep, 2011 4 commits
  10. 31 Aug, 2011 13 commits
    • Rusty Russell's avatar
      tdb2: enhance tdb1 porting document. · 9cbae0f9
      Rusty Russell authored
      9cbae0f9
    • Rusty Russell's avatar
      tdb2: delete old tdb1 tests. · e42097b7
      Rusty Russell authored
      These two tdb1-specific tests have been superceded by the TDB_VERSION1
      flags used in the main tests.
      e42097b7
    • Rusty Russell's avatar
      tdb2: test: Speed up run-01-new_database. · b3ae8999
      Rusty Russell authored
      Don't run tdb_check with failtest on, since it is very slow.  Do the
      tdb_check w/ failtest in a new test, but skip MMAP suppression which
      doesn't add much and slows down valgrind a lot.
      
      Before this change run-01-new_database took 40 seconds (under
      valgrind), after it takes 8 seconds, and run-12-check takes 3
      seconds).
      b3ae8999
    • Rusty Russell's avatar
      tdb2: speed up testing. · a99c2ccf
      Rusty Russell authored
      The time to run tests under valgrind has become excessive; particularly
      the failure tests which fork().   Thus we cut down testing:
      
      1) api-94-repack: reduce from 234 seconds to 2 seconds by cutting
         iterations, despite adding TDB_VERSION1 tests.
      
      2) api-missing-entries: reduce from 17 seconds to under 1 second by
         not checking db inside loop, but at end.
      
      This reduces the total ccanlint time from 729 to 489 seconds.
      a99c2ccf
    • Rusty Russell's avatar
      tdb2: test: convert (non-invasive) run tests to api tests. · c4ca9f54
      Rusty Russell authored
      This reduces compilation time, since these are merely linked with the
      pre-built module, rather than recompiling it into the test (which
      allows for fancy things like failtest).
      
      This reduces the test compile time down from about 62 seconds to 45
      seconds.  Since ccanlint compiles tests three times (once normally,
      once with coverage, and once with reduced config.h) this makes a
      difference: we go from 780 seconds to 729 seconds.
      c4ca9f54
    • Rusty Russell's avatar
      tdb2: test: fix run-57-die-during-transaction.c to be more efficient. · d9cbd7d4
      Rusty Russell authored
      We track malloc and free, but we didn't catch the free() inside
      external_agent, which means that our list of allocations keeps
      growing.  Particularly under valgrind, which re-uses memory less than
      the glibc allocator.
      d9cbd7d4
    • Rusty Russell's avatar
      tdb2: don't continue if tdb1_find fails. · 1be090a2
      Rusty Russell authored
      The TDB1 code's tdb1_find() returns 0 on error; the callers should
      not assume that the error means that the entry wasn't found, but use
      last_error to determine it.
      
      This was found by looking at how long the failure path testing for
      test/run-10-simple-store.c was taking under valgrind, ie:
      
      	valgrind -q ./run-10-simple-store --show-slowest
      
      This change dropped the time for that test from 53 seconds to 19
      seconds.
      1be090a2
    • Rusty Russell's avatar
      tdb2: test: try (almost) all tests with TDB_VERSION1 flag. · 818ed297
      Rusty Russell authored
      There are some minor changes required, in particular:
      
      1) Make sure lockcheck understands tdb1 allrecord lock upgrades.
      2) Handle tdb1 sequence number jumps: various operations increment the
         sequence number twice, especually tdb_append.
      3) Don't test fail on unlock, since it gets triggered with traversal on the
         tdb1 backend (we didn't actually ever test this case for tdb2).
      4) Move clear_if_first to offset 4, to match tdb1. 
      818ed297
    • Rusty Russell's avatar
      tdb2: log allocation failures in tdb1 backend. · 670ba98f
      Rusty Russell authored
      The TDB2 tests are stricter about this; they want every error logged.
      670ba98f
    • Rusty Russell's avatar
      tdb2: fix bogus error from tdb_unlockall() after fork in tdb1 backend. · ba5bb8ea
      Rusty Russell authored
      We're always allowed to unlock after a fork; by setting the count to 0
      before calling the generic unlock function we don't trigger the pid
      check.
      ba5bb8ea
    • Rusty Russell's avatar
      tdb2: check lock owner in tdb1 backend. · bef6f1b0
      Rusty Russell authored
      This reports errors if we fork() while holding a lock, or misuse a tdb
      which we have dual-opened.
      bef6f1b0
    • Rusty Russell's avatar
      tdb2: return TDB_ERR_RDONLY from transactions on R/O databases, log nesting · 27647f94
      Rusty Russell authored
      Rather than rturning TDB_ERR_EINVAL, return TDB_ERR_RDONLY, and log
      when we fail due to nesting.
      27647f94
    • Rusty Russell's avatar
      tdb2: add stats to tdb1 backend. · a3e4ebff
      Rusty Russell authored
      It's actually quite a good fit; we use compare_wrong_bucket for dead
      records, which is kind of correct (they should be in the free list).
      a3e4ebff