0
我使用Hazelcast作爲分佈式鍵值存儲。我將存儲約。其中100k個密鑰 爲了在整個hazelcast羣集節點之間保持更強的數據一致性,我正在使用IMap的同步備份作爲分佈式數據結構。面臨着榛木備份的問題 - 同步備份不起作用
在2個Unix盒子中運行2個節點的榛樹簇, 問題:在兩個節點中加載1000條記錄的樣本數據時,我沒有看到備份同步發生,儘管我已經明確將同步備份設置爲1 ,從日誌中進行驗證,還有榛子管理中心。 當我關閉羣集的一個hazelcast節點時,數據會丟失,即數據沒有從同步備份恢復。
任何人都可以請建議,如果下面提到的任何配置丟失或衝突與同步備份?
請從下面簡要hazelcast.xml配置我使用做我的POC:
<group>
<name>abc</name>
<password>xyz</password>
</group>
<map name="default">
<in-memory-format>BINARY</in-memory-format>
<backup-count>1</backup-count>
<async-backup-count>0</async-backup-count>
<read-backup-data>false</read-backup-data>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>86400</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="used_heap_size">300</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>100</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<statistics-enabled>true</statistics-enabled>
<map-store enabled="true" initial-mode="LAZY">
<!--<factory-class-name>com.mypackage.FileSystemMapStoreFactory</factory-class-name>-->
<class-name>com.java.poc.TestMapStore</class-name>
<write-delay-seconds>0</write-delay-seconds>
<!--<write-batch-size>1000</write-batch-size>-->
<write-coalescing>false</write-coalescing>
</map-store>
</map>
<serialization>
<portable-version>0</portable-version>
<use-native-byte-order>true</use-native-byte-order><!-- Set to true to use native byte order for the underlying platform -->
<byte-order>BIG_ENDIAN</byte-order>
<enable-compression>false</enable-compression><!-- Enables compression if default Java serialization is used -->
<enable-shared-object>false</enable-shared-object><!-- Enables shared object if default Java serialization is used -->
<allow-unsafe>true</allow-unsafe><!-- Set to true to allow unsafe to be used -->
<check-class-def-errors>true</check-class-def-errors>
<data-serializable-factories><!-- The DataSerializableFactory class to be registered -->
<data-serializable-factory factory-id="1">com.java.poc.DataSerializableFactoryImpl</data-serializable-factory>
</data-serializable-factories>
</serialization>