Replay in place

Nice work on the replay! Havent tested it fully yet but it looks really nice.

One thing we did notice when playing with the provided implementation of EventStoreMangement was that the optional index on sequenceNumber (http://www.axonframework.org/docs/1.4/performance-tuning.html#d4e1650) is not really optional with 40 million events : ).

Cheers
Sebastian

Hi Sebastian,

I'll update the documentation with this. The link you sent was of 1.4 doc (but 2.0) contains same sentence :-).

I managed to get my hands on a 30GB event store, but I didn't get round performance testing yet. If you do, please don't hesitate to let me know where the improvements are.

Cheers,

Allard

PS. There is some hibernate specific enhancements if Axon detects Hibernate. Which JPA provider do you use?

We are using Hibernate.

Unfortunately it seems the index didn’t help when you try to order the whole set of events, MySQL still resorts to file sort and takes more than 10 minutes (at which time the client timed out and I gave up for the time). Some googling suggests splitting the table up into smaller tables to perform this types of queries on huge tables…

When you say hibernate specific enhancements, are you takling about the use of fetchSize instead of BatchingIterators setFirstResult and setMaxResults? When turning on hibernate SQL-logging it seems it is doing the exact same thing (a sequence of selects with … limit 101, 100; … limit 201, 100 etc) but in addition it starts of with a select without the limit part (which takes forover (more than 10 minutes)). Very strange and not really functional : ) … Even without the first select every batchs select takes longer and longer time, resorting to file sort after a couple of million events and then the queries no longer seem tractable.

However, for the case we are working on the moment we currently only need replay per customer and that seems to be doable by keeping a list of aggregates associated to the customer and joining that with DomainEventEntry to get the domain events for that particular customer.

Insight: I guess the “…limit ?, ?” comes from the DefaultEventEntryStore taking over since after I’ve killed the first query in MySQL.