4
後我有兩個服務器一個hazelcast集羣,每個服務器上的兩個節點。 我正在使用hazelcast jar,因此每次服務器重新啓動時,每個服務器上的節點都會重新啓動。每當兩臺服務器發生部署時,它們將以30秒的差異重新啓動。 我有一個特定的實例,每次應用程序請求某個特定的數據時,都會引發此異常。 我正在使用MultiMap來緩存數據。獲取com.hazelcast.spi.exception.PartitionMigratingException無限重啓集羣
Caused by: com.hazelcast.spi.exception.PartitionMigratingException: Partition is migrating! this:Address[app01]:5701, partitionId: 0, operation: com.hazelcast.map.impl.operation.PutOperation, service: hz:impl:mapService
at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.ensureNoPartitionProblems(BasicOperationService.java:833)
at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.handle(BasicOperationService.java:741)
at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.access$500(BasicOperationService.java:725)
at com.hazelcast.spi.impl.BasicOperationService$BasicDispatcherImpl.dispatch(BasicOperationService.java:576)
at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.process(BasicOperationScheduler.java:466)
at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.doRun(BasicOperationScheduler.java:458)
at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.run(BasicOperationScheduler.java:432)
我看到其中的幾個例外。
2015-04-10 14:51:03,403 WARN com.hazelcast.spi.impl.BasicInvocation - [app01]:5701 [dev] [3.4.2] Retrying invocation: BasicInvocation{ serviceName='hz:impl:mapService', op=PutOperation{alert-coms}, partitionId=0, replicaIndex=0, tryCount=250, tryPauseMillis=500, invokeCount=100, callTimeout=60000, target=Address[app01]:5701, backupsExpected=0, backupsCompleted=0}, Reason: com.hazelcast.spi.exception.PartitionMigratingException: Partition is migrating! this:Address[app01]:5701, partitionId: 0, operation: com.hazelcast.map.impl.operation.PutOperation, service: hz:impl:mapService
我所知,這是重試相同的操作引發了異常,但問題是該分區作業未完成了整個週末,直到我再次重新啓動服務器。
請幫助我瞭解爲什麼發生這種情況,並可以採取什麼措施來防止它。
謝謝。
我使用Hazelcast 3.5.4。我會嘗試升級到3.7。謝謝。 –
我們有關於新分區遷移方案的技術設計文檔。見https://hazelcast.atlassian.net/wiki/display/COM/Avoid+Data+Loss+on+Migration+-+Solution+Design –