Greetings, I am currently using the community plugin for mysql (
"com.github.mauricio" %% "mysql-async" % "0.2.16") for AKKA persistence. However, when I perform a rolling restart I get exceptions like the following:
Nov 18 10:11:20 vtest-app01 application-9001.log: 2016-11-18 16:11:19 +0000 - [ERROR] - [PersistentShardCoordinator] akka.tcp://a...@10.77.21.34:2551/system/sharding/UserActivityActorCoordinator/singleton/coordinator - Failed to persist event type [akka.cluster.sharding.ShardCoordinator$Internal$ShardRegionRegistered] with sequence number [837] for persistenceId [/sharding/UserActivityActorCoordinator].
Nov 18 10:11:20 vtest-app01 application-9001.log: com.github.mauricio.async.db.mysql.exceptions.MySQLException: Error 1062 - #23000 - Duplicate entry '3-837' for key 'PRIMARY'
Nov 18 10:11:20 vtest-app01 application-9001.log: at com.github.mauricio.async.db.mysql.MySQLConnection.onError(MySQLConnection.scala:124)
Nov 18 10:11:20 vtest-app01 application-9001.log: at com.github.mauricio.async.db.mysql.codec.MySQLConnectionHandler.channelRead0(MySQLConnectionHandler.scala:105)
Nov 18 10:11:20 vtest-app01 application-9001.log: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
Now I grant that this may be because of the persistence plugin having issues but I am wondering if there is something else I am doing wrong in the shutdown. The steps I used to shut down the rolling node are:
1. I send each shard region a graceful shutdown instance and wait for them all to terminate
2. send all the top level actors a PoisonPill
3. issue a cluster leave and wait for the member to be removed
4. After a 10 second delay terminate the actor system.
Is there another persistence plugin that would potentially suit my needs better? I would prefer to store the journal and snapshots in our main SQL based RDBMS if possible but I am open to options.
Thanks