1. 19 Sep, 2002 3 commits
    • Guido van Rossum's avatar
      The mystery of the Win98 hangs in the checkReconnectSwitch() test · da28b620
      Guido van Rossum authored
      until I added an is_connected() test to testConnection() is solved.
      
      After the ConnectThread has switched the client to the new, read-write
      connection, it closes the read-only connection(s) that it was saving
      up in case there was no read-write connection.  But closing a
      ManagedConnection calls notify_closed() on the manager, which
      disconnected the manager and the client from its brand new read-write
      connection.  The mistake here is that this should only be done when
      closing the manager's current connection!
      
      The fix was to add an argument to notify_closed() that passes the
      connection object being closed; notify_closed() returns without doing
      a thing when that is not the current connection.
      
      I presume this didn't happen on Linux because there the sockets
      happened to connect in a different order, and there was no read-only
      connection to close yet (just a socket trying to connect).
      
      I'm taking out the previous "fix" to ClientStorage, because that only
      masked the problem in this relatively simple test case.  The problem
      could still occur when both a read-only and a read-write server are up
      initially, and the read-only server connects first; once the
      read-write server connects, the read-write connection is installed,
      and then the saved read-only connection is closed which would again
      mistakenly disconnect the read-write connection.
      
      Another (related) fix is not to call self.mgr.notify_closed() but to
      call self.mgr.connection.close() when reconnecting.  (Hmm, I wonder if
      it would make more sense to have an explicit reconnect callback to the
      manager and the client?  Later.)
      da28b620
    • Guido van Rossum's avatar
      Define __str__ as an alias for __repr__. Otherwise __str__ will get · b0e16c71
      Guido van Rossum authored
      the socket's __str__ due to a __getattr__ method in asyncore's
      dispatcher base class that everybody hates but nobody dares take away.
      b0e16c71
    • Guido van Rossum's avatar
      Log the map at DEBUG level, not BLATHER. · bb4a24c5
      Guido van Rossum authored
      Add the pid to the label.
      bb4a24c5
  2. 18 Sep, 2002 2 commits
    • Guido van Rossum's avatar
      Cache policy improvement: · d1c6a2c8
      Guido van Rossum authored
      When load() finds a hit in the non-current file, copy it to the
      current file (except when this would cause a cache flip).
      
      It is hoped that this improves the cache performance.
      
      (Now merged into the trunk!  Jeremy & Jim want this in the ZEO and ZODB3 beta2 releases.)
      d1c6a2c8
    • Guido van Rossum's avatar
      Fix a mysterious Windows hang: checkReconnectSwitch() would fail. · 5cf04dac
      Guido van Rossum authored
      The fix is to change testConnection() to only retry the register()
      call with the read-only flag set when we're not alrady connected.
      But I don't understand why this fix is needed; I'll keep debugging.
      5cf04dac
  3. 17 Sep, 2002 26 commits
  4. 16 Sep, 2002 8 commits
  5. 15 Sep, 2002 1 commit
    • Guido van Rossum's avatar
      Fix argument passing to the storage factory in winserver. · 207efabe
      Guido van Rossum authored
      This code used to assume that all arguments were strings.
      It was always wrong (create was passed as '0' or '1' rather
      than as 0 or 1) but this was somehow masked.  When I added
      readonly, things broke.  The solution is that winserver.py
      ha a convention that an argument starting with '=' is
      evaluated as an expression, and _startserver in testZEO's
      WindowsConnectionText uses this for the create and readonly
      args.
      207efabe