1 Reply Latest reply on Nov 21, 2009 4:37 PM by clebert.suconic

    Persistence versus non persistence ordering...

    clebert.suconic

      As I talked to Tim this morning on IRC, there is an issue with ordering on the AIO Callbacks.

      Which is the same issue we had before with replication. As there's nothing to hold on non-persistence, non persistence sends were happening out of order (when mixing with persistent).

      I could fix that by adding a method syncCallback on the SequentialFiles. This method won't perform any IO, but it will make sure the callback will be called only after the current pending IO operations are performed.

      I'm now doing a further check on the Producer. It should be no reason to sync if there are no pending persistent messages to be sent. So I will add extra check to make sure there wouldn't be any syncs on those cases.


      Also, this will not do any context switch if there is no need to sync, the producer will just send to the queues directly.

      The OperationContext (old ReplicationContext, now renamed) has a check for...

      if pending==0
       runnable.run


        • 1. Re: Persistence versus non persistence ordering...
          clebert.suconic

          EEEEEEEEEUUUUUUUUUURRRRRREEEEEEEEEKAAAAAAAAAAA


          Like a crazy scientist...


          It was so simple all the time and I couldn't see it... no need to syncs, extra syncs or anything like that!!!!!


          We just always use the same Context on the Session. The session is single threaded anyway, right?

          With the recent changes I have done, It's not necessary to close the context at the end any more.

          I can just reuse the same context all the time, and keep the order naturally.


          Simple and easy like that!


          Why I couldn't see that before?