An error occurred fetching the project authors.
  1. 20 Dec, 2011 1 commit
  2. 26 Oct, 2011 1 commit
  3. 03 Sep, 2011 1 commit
  4. 27 May, 2011 2 commits
    • Julien Muchembled's avatar
      connection: reimplement timeout logic and redefine pings as a keep-alive feature · 737e227a
      Julien Muchembled authored
      - Previous implementation was not able to import transactions with many small
        objects, the client for faster to send a store request than to process its
        answer. If X is the difference of time for these 2 operations, the maximum
        number of objects a transaction could contain was CRITICAL_TIMEOUT / X.
        And HasLock feature can't act as a workaround because it is not working yet.
      - Change API of 'on_timeout', which currently only used by HasLock.
      - Stop pinging when we wait for an answer. This wastes resources and would
        never recover any bad state.
      - Make client connections send pings when they are idle instead.
        This implements keep-alive feature for high availability.
        Start with an non-configurable period of 60 seconds.
      - Move processing of ping/pong to handlers.
      
      git-svn-id: https://svn.erp5.org/repos/neo/trunk@2762 71dcc9de-d417-0410-9af5-da40c76e7ee4
      737e227a
    • Julien Muchembled's avatar
      Remove overkill Packet.getType method · f7378a70
      Julien Muchembled authored
      git-svn-id: https://svn.erp5.org/repos/neo/trunk@2761 71dcc9de-d417-0410-9af5-da40c76e7ee4
      f7378a70
  5. 29 Apr, 2011 1 commit
  6. 27 Apr, 2011 1 commit
    • Julien Muchembled's avatar
      connection: make close always call handler (connectionClosed or connectionFailed) · 4b6c1387
      Julien Muchembled authored
      Main reason is that it's difficult to know in advance which side really closes
      the connection. Network events can be chaotic and this could lead to many race
      conditions.
      Thus, handler can be used to update any database that is somewhat redundant
      to the connection status, i.e. node status usually. Safely and less duplicated
      code.
      
      This change is motivated by recurrent random failures during election.
      An example of race condition was that 2 fully connected master could close the
      extra connection (the primary -> secondary one) at the same time.
      
      In order to stabilize lower-level code and start with reliable election process,
      code has also been simplified to not care about node states. All connections
      without exception are closed at the end of the election and states are then
      updated 1 by 1 by identification handler.
      Note that during election, there may be 2 connection per node, which makes
      difficult to update node states by connectionFailed/connectionClosed events.
      
      timeoutExpired & peerBroken are dropped as they are unused for the moment.
      A new API should be designed so that connectionClosed know the reason of the
      close.
      BROKEN state becomes unused.
      
      git-svn-id: https://svn.erp5.org/repos/neo/trunk@2732 71dcc9de-d417-0410-9af5-da40c76e7ee4
      4b6c1387
  7. 21 Apr, 2011 1 commit
  8. 24 Mar, 2011 3 commits
  9. 23 Mar, 2011 1 commit
  10. 21 Mar, 2011 1 commit
    • Julien Muchembled's avatar
      Small code cleanups · 75cd5ecb
      Julien Muchembled authored
      - remove useless calls to 'bool'
      - small optimizations in lib.protocol.Packet.__init__
      - code simplification in IdentificationHandler
      - fix typo in docstring
      - neo/tests/__init__.py: 2 lines were indented with 2-spaces instead of 4-spaces
      
      git-svn-id: https://svn.erp5.org/repos/neo/trunk@2671 71dcc9de-d417-0410-9af5-da40c76e7ee4
      75cd5ecb
  11. 17 Jan, 2011 1 commit
  12. 02 Nov, 2010 2 commits
  13. 01 Nov, 2010 1 commit
  14. 27 Aug, 2010 1 commit
  15. 24 Aug, 2010 1 commit
    • Vincent Pelletier's avatar
      Don't store connection on instances. · 37decce5
      Vincent Pelletier authored
      This causes garbage collection problems, as BaseConnection instances also
      hold a reference to HandlerSwitcher instance. It is unclear why it fails,
      as microbenchs show this should not be a problem for gc.
      Also, move loggers out of HandlerSwitcher.setHandler to avoid passing a
      connection parameter just for them.
      
      git-svn-id: https://svn.erp5.org/repos/neo/trunk@2222 71dcc9de-d417-0410-9af5-da40c76e7ee4
      37decce5
  16. 07 Jun, 2010 1 commit
  17. 13 May, 2010 1 commit
    • Vincent Pelletier's avatar
      Make possible to call a function on timeout. · 36d83981
      Vincent Pelletier authored
      Such function is provided when message is queued for send when an answer
      is expected, and is called when the answer is not arrived after expiration
      of the timeout delay. Depending on the return value of this callback, the
      timeout is ignored (True) or passed through (False).
      
      Also, move code to refresh next timeout value to a separate function, for
      reusability.
      
      git-svn-id: https://svn.erp5.org/repos/neo/trunk@2106 71dcc9de-d417-0410-9af5-da40c76e7ee4
      36d83981
  18. 28 Apr, 2010 2 commits
  19. 27 Apr, 2010 3 commits
  20. 23 Apr, 2010 1 commit
  21. 22 Apr, 2010 1 commit
    • Vincent Pelletier's avatar
      Change (again) the way timeouts are handled. · 393e59e0
      Vincent Pelletier authored
      There are 2 distinct kinds of timeout events:
      - an unresponsive node
        This is a connection-level timeout.
        This is handled by the Timeout class, triggering pings and monitoring
        incoming data to decide when remote node is considered dead.
      - a "too long" processing from an otherwise responsive node
        This is a per-request timeout.
        This is handled by the HandlerSwitcher class, triggering only
        disconnections when an answer takes too long to arrive (historical
        behaviour, not so useful when exchanging with a single-threaded peer).
      
      Previous implementation mixed both, and had shortcomings (ping would
      timeout almost immediately, it was not possible to tell which message
      caused a timeout).
      
      Update tests.
      
      git-svn-id: https://svn.erp5.org/repos/neo/trunk@2009 71dcc9de-d417-0410-9af5-da40c76e7ee4
      393e59e0
  22. 19 Apr, 2010 1 commit
  23. 26 Mar, 2010 1 commit
  24. 08 Mar, 2010 1 commit
  25. 05 Mar, 2010 1 commit
    • Grégory Wisniewski's avatar
      Per-connection timeout support (instead of per-packet). · 61dbc7b6
      Grégory Wisniewski authored
      - Rename IdleEvent to IdleTimeout from event.py to connection.py
      - Move connection-related logic in Connection itself and keep only
      time-related logic in IdleTimeout
      - Clarify differences between hard and soft timeouts.
      - Remove (unused) 'additional_timeout' from ask()
      - Remove (now useless) event_dict attribute from Connection.
      - Remove external ping support, as the answer can not be handled at
      application level.
      - Expectation after a new incoming connection moved from Handler to
      Connection.
      - Fix (and clean) related tests.
      
      git-svn-id: https://svn.erp5.org/repos/neo/trunk@1895 71dcc9de-d417-0410-9af5-da40c76e7ee4
      61dbc7b6
  26. 01 Mar, 2010 3 commits
  27. 26 Feb, 2010 1 commit
  28. 23 Feb, 2010 2 commits
  29. 10 Feb, 2010 1 commit
  30. 01 Feb, 2010 1 commit