Hazelcast MapStore: In some cases no insert is done on local node

108 views
Skip to first unread message

Hamid Fajic

unread,
Apr 8, 2014, 11:35:22 AM4/8/14
to haze...@googlegroups.com

HI all,

 

I use MS SQL DB as Backing Store for Hazelcast Maps and have at the moment strange behaviour... In some situations it seems that in case of put-operation the data are not inserted on local node.. It seems that replication comes at first, and inserts the record on other node (in this case on master node). This implicates that no insert is performed on local node ..

Example: Records WIES1_STECH021_1396967946881; WIES2__STECH021_1396967947181; WIES3__STECH021_1396967947481; WIES3__STECH021_AFTER_1396968007615
 
should be inserted on node STECH021 but it is doing only for WIES3__STECH021_AFTER_1396968007615..

 

The remaining entries are inserted on node STECH016..

 

See also log attachments of both nodes..

 

In my case is essentially important that data which are inserted on one node are at first inserted on this node and then replicated through cluster ..

 

Another question: Is it possible to set InitialLoadMode configuration parameter of MapStoreConfig via hazelcast.xml file? I only found a way over API.. (..getMapStoreConfig().setInitialLoadMode(InitialLoadMode.EAGER))

 

Some relevant input data:

Hazecast version: Hazelcast Community Edition 3.2

IP Discovering: Multicast

Used map config: see below

 

Any Idea what going wrong here?.. Config problem, timing issue (if db connection is very slow.. ) ..

 

Thanks and regards,

Hamid

 

// Map Config

<map name="persistentmaps.*">       

        <backup-count>1</backup-count>       

        <async-backup-count>0</async-backup-count>       

        <time-to-live-seconds>0</time-to-live-seconds>       

        <max-idle-seconds>0</max-idle-seconds>       

        <eviction-policy>NONE</eviction-policy>            

        <eviction-percentage>25</eviction-percentage>

        <merge-policy>hz.ADD_NEW_ENTRY</merge-policy>

        <map-store enabled="true">           

            <factory-class-name>com.smart.spl.hazelcast.persistence.MapStoreFactory</factory-class-name>

            <write-delay-seconds>0</write-delay-seconds>

            <properties>

                <!-- <property name="dummy.property">value</property> -->

            </properties>

        </map-store>

</map>

STECH016.txt
STECH021.txt

Enes Akar

unread,
Apr 9, 2014, 2:05:43 AM4/9/14
to haze...@googlegroups.com
 Hi Hamid;

Hazelcast assumes all nodes persists to the same place, e.g. a central database.
Hazelcast distributes data into partitions and you can not know which node will own which partitions.
So you can not know which node is the owner of the entry.
Namely, your mapstore implementation should persist into a central data store accessible by all nodes.  


--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/a3d2b54b-aa7b-4a28-8f06-a88e6c2e36de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Enes Akar
Hazelcast | Open source in-memory data grid

Hamid Fajic

unread,
Apr 9, 2014, 5:03:18 AM4/9/14
to haze...@googlegroups.com

Hi Enes,

 

a central data store accessible by all nodes is not always existent.. In some use cases we are using OrientDB in local mode as HZ backing storage.. Here is essentially important that data which are inserted on one node are also available in local OrientDB database.. Is there any way, workaround , etc. to keep local database up to date with entries which are performed on this node?

 

Thanks and regards,

Hamid



--
You received this message because you are subscribed to a topic in the Google Groups "Hazelcast" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hazelcast/9yBGfaBIQs4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hazelcast+...@googlegroups.com.

To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.

Enes Akar

unread,
Apr 9, 2014, 5:05:30 AM4/9/14
to haze...@googlegroups.com
Sorry Hamid. Currently hazelcast does not support distributed persistence. We have plans but long term plans.



For more options, visit https://groups.google.com/d/optout.

Hamid Fajic

unread,
Apr 9, 2014, 5:20:52 AM4/9/14
to haze...@googlegroups.com

OK, thanks Enes..

 

I must think about some kind of workaround how  to keep local database up to date..

 

Best Regards,

Hamid



Reply all
Reply to author
Forward
0 new messages