Skip to content
Snippets Groups Projects
  1. Jan 21, 2011
  2. Jan 06, 2011
  3. Dec 06, 2010
  4. Oct 28, 2010
  5. Sep 07, 2010
  6. Aug 27, 2010
  7. Aug 24, 2010
    • Michael Hanselmann's avatar
      Fix race condition in locking unittest · 73c25d35
      Michael Hanselmann authored
      
      While writing unittests for the new lock monitor, I made a small mistake and
      didn't synchronize acquiring locks properly. This patch takes care of this
      issue by adding additional synchronization.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      73c25d35
    • Michael Hanselmann's avatar
      Add simple lock monitor · 19b9ba9a
      Michael Hanselmann authored
      
      This patch adds an initial implementation of a lock monitor, accessible
      for the user through “gnt-debug locks”. It currently shows all resource
      locks: BGL, nodes and instances. Config and job queue locks could be
      shown too, but wouldn't be of much help.  The current owner(s) and mode
      are also shown.
      
      Showing pending acquires will require further changes on the SharedLock
      internals and is not yet implemented.
      
      Example output:
      $ gnt-debug locks -o name,mode,owner
      Name            Mode      Owner
      BGL/BGL         shared    JobQueue19/Job147
      instances/inst1 exclusive JobQueue19/Job147
      instances/inst2 -         -
      instances/inst3 -         -
      instances/inst4 -         -
      nodes/node1     exclusive JobQueue19/Job147
      nodes/node2     exclusive JobQueue19/Job147
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      19b9ba9a
  8. Jul 16, 2010
    • Iustin Pop's avatar
      Implement lock names for debugging purposes · 7f93570a
      Iustin Pop authored
      
      This patch adds lock names to SharedLocks and LockSets, that can be used
      later for displaying the actual locks being held/used in places where we
      only have the lock, and not the entire context of the locking operation.
      
      Since I realized that the production code doesn't call LockSet with the
      proper members= syntax, but directly as positional parameters, I've
      converted this (and the arguments to GlobalLockManager) into positional
      arguments.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      7f93570a
  9. Jun 30, 2010
  10. Jun 10, 2010
  11. Jan 15, 2010
  12. Nov 03, 2009
  13. Oct 13, 2009
  14. Oct 12, 2009
  15. Oct 02, 2009
  16. Oct 01, 2009
  17. Sep 30, 2009
  18. Nov 18, 2008
  19. Nov 12, 2008
    • Iustin Pop's avatar
      Convert the locking unittests to repetition-test · 4607c978
      Iustin Pop authored
      Currently the locking tests are using timeouts to ensure an event will
      'never happen'. However, this is suboptimal.
      
      The patch converts all of these to instead: not wait, but sequence the
      operations logically and expect that they execute as such. In case of
      not so, they will timeout with a big (60s) timeout.
      
      The 'never happen' is tested by multiple repetitions of the same test -
      this is not perfect, but again 'X will never happen' is not actually
      testable.
      
      This patch reduces the runtime of the tests from ~5.4 to ~0.8 seconds
      (with 8 repetitions of each test thas has 'never happen' situations).
      
      Reviewed-by: imsnah
      4607c978
  20. Sep 11, 2008
    • Guido Trotter's avatar
      LockSet: forbid add() on a partially owned set · d2aff862
      Guido Trotter authored
      This patch bans add() on a half-acquired set. This behavior was
      previously possible, but created a deadlock if someone tried to acquire
      the set-lock in the meantime, and thus is now forbidden. The
      testAddRemove unit test is fixed for this new behavior, and includes a
      few more lines of testing and a new testConcurrentSetLockAdd function
      tests its behavior in the concurrent case.
      
      Reviewed-by: imsnah
      d2aff862
    • Guido Trotter's avatar
      Fix LockSet._names() to work with the set-lock · d4803c24
      Guido Trotter authored
      If the set-lock is acquired, currently, the _names function will fail on
      a double acquire of a non-recursive lock. This patch fixes the behavior,
      and some lines of code added to the testAcquireSetLock test check that
      this and other functioins behave properly.
      
      Reviewed-by: imsnah
      d4803c24
  21. Aug 18, 2008
    • Guido Trotter's avatar
      A few more locking unit tests · d4f6a91c
      Guido Trotter authored
      A few more tests written while bug-hunting. One of them shows a real
      issue, at last. :)
      
      Reviewed-by: imsnah
      d4f6a91c
    • Guido Trotter's avatar
      Add lock-all-through-GLM unit test · 90c942d1
      Guido Trotter authored
      I was hunting for a bug in my code and thought the culprit was in the
      locking library, so I added a test to check. Unfortunately turns out it
      wasn't. :( Committing the test anyway, while still trying to figure out
      what's wrong...
      
      Reviewed-by: imsnah
      90c942d1
  22. Jul 23, 2008
    • Guido Trotter's avatar
      Invert nodes/instances locking order · 04e1bfaf
      Guido Trotter authored
      An implementation mistake from the original design caused nodes to be
      locked before instances, rather than after. This patch inverts the level
      numbering, changing also the relevant unittests and the recursive
      locking function starting point.
      
      Reviewed-by: iustinp
      04e1bfaf
  23. Jul 08, 2008
    • Guido Trotter's avatar
      Add a more comment lines to testLockingConstants · b10b9d74
      Guido Trotter authored
      This is to discourage even more whoever may think that this requirement
      is not really useful and can be lifted, and to at least know where it's
      used before trying to break it.
      
      Reviewed-by: imsnah
      b10b9d74
    • Guido Trotter's avatar
      Add a new LockSet unittest · 2e1d6d96
      Guido Trotter authored
      This test checks the LockSet behaviour when an empty list is passed.
      The current behaviour is expected, but since this is a corner case,
      we're safer to keep it under a check, and if we need a different one
      monitor that everything is as we expect it to be.
      
      Reviewed-by: imsnah
      2e1d6d96
    • Guido Trotter's avatar
      Locking: remove LEVEL_CONFIG lockset · 08a6c581
      Guido Trotter authored
      Since the ConfigWriter now handles its own locking it's not necessary to
      have a specific level for the config in the Locking Manager anymore.
      This patch thus removes it, and all the unittest calls that used it, or
      depended on it being present.
      
      Reviewed-by: iustinp
      08a6c581
Loading