使用MapStore和Hazelcast我遇到了一个奇怪的问题。我已经实现了一个持久存储到数据库的MapStore。当我开始我的hazelcast应用程序时,我有两个成员。当我的客户端程序调用map.put(key,object)时,只有当它在member-2上时才会被存储,当成员-2上的条目没有被持久化时。请参见下面的截图。我的数据库表有5条记录,但我缺少5702成员的7条记录。我希望在我的数据库表中有12条记录。有什么问题?
这是我的mapstore配置,它在applicationContext中,因为我使用spring,jpa,hibernate
<!-- Mapstores -->
<bean id="customerMap" class="nl.ict.psa.ocr.hazelcast.mapstores.CustomerMapStore"/>
<hz:hazelcast id="instance">
<hz:config>
<hz:management-center enabled="true" url="http://localhost:6060/mancenter"/>
<hz:network port="${hz.network.port}" port-auto-increment="${hz.port.autoincrement}">
<hz:join>
<hz:multicast enabled="true" />
</hz:join>
</hz:network>
<hz:map name="customer" read-backup-data="true">
<hz:map-store write-coalescing="true" enabled="true" write-delay-seconds="${hz.write.delay.seconds}"
initial-mode="LAZY"
implementation="customerMap"/>
</hz:map>
</hz:config>
</hz:hazelcast>
port-auto-increment = false,write-delay-seconds = 0
由于
Ĵ