1 Reply Latest reply on Feb 11, 2013 5:37 AM by Andy Taylor

    live.stop() issues and proposed patch

    borges Novice

      Note that the patch is not even a PR at this moment...


      We used to have problems where:

      1. live.stop() is called;
      2. network went down;
      3. live would hang because of missing replication tokens.


      We scheduled a thread to clean replication tokens in 10s. But the trick is that right after that we would call replicationManager.stop() which would clean them all anyway.




      besides that there were the following problems in server.stop() (related or not to replication.)

      • calling storageManager.closeIdGenerator() very early. Before closing the server sessions.
      • sending LIVE IS STOPPING before closing server sessions.
      • not passing criticalIoError to storageManager.stop(boolean criticalError), which defeats the point of having the method there.



      @Clebert, the patch above fixes ReplicatedPagedFailoverTest.testFailThenReceiveMoreMessagesAfterFailover2() for me (man, jboss.org forum interface sucks...)


      @Clebert and @AndyTaylor can you guys take a look at https://github.com/FranciscoBorges/hornetq/commit/901d2173be390861a2055b51bcd46cc63c91b58c for obvious problems before I send a PR? (I would rather avoid merging this without a proper discussion).