Data Loss while upgrading custom jar from old jar in server and client nodes

classic Classic list List threaded Threaded
8 messages Options
siva siva
Reply | Threaded
Open this post in threaded view
|

Data Loss while upgrading custom jar from old jar in server and client nodes

Hi,

we have two nodes server and client

we are using ignite cachestore and native persistence till now worked fine.

But we have changed the cache store package
.i.e previously cache store implementation classes and cachestore factory
classes are in same package

In Existing:
        com.organization.cachestore.EntitycacheStore
        com.organization.cachestore.EntitycacheStoreFactory

Currently Change to:
     com.organization.cachestore.EntitycacheStore
         com.organization.cachestore.factory.EntitycacheStoreFactory

Then i have copied the jar file to the server node  and restarted ignite.its
throwing the exception like class not found exception
EntitycacheStoreFactory.class. Because It still checking factory class from
package com.organization.cachestore not from
com.organization.cachestore.factory

How to overcome from this issue.




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Roman Guseinov Roman Guseinov
Reply | Threaded
Open this post in threaded view
|

Re: Data Loss while upgrading custom jar from old jar in server and client nodes

Hi,

I think that you are able to use only one storage for a cache: 3d Party
Persistence or Native Persistence.

Did you update the class name in xml configuration [1]?

<property name="cacheStoreFactory">
    <bean
class="com.organization.cachestore.factory.EntitycacheStoreFactory">

Did you restart all nodes after updating jar-files?

If you did, could you share a small project (in GitHub preferably) and steps
which can help us with reproducing the issue?

[1] https://apacheignite.readme.io/docs/3rd-party-store

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
siva siva
Reply | Threaded
Open this post in threaded view
|

Re: Data Loss while upgrading custom jar from old jar in server and client nodes

Hi , Thanks for the reply

Did you restart all nodes after updating jar-files?
Ans) Yes i have restarted client and server node after updated the jar file.

I have shared a sample project on github ,so you can have look at through
following link

Link:
https://github.com/cvakarna/springboot-Ignite/tree/master/IgniteSample
<https://github.com/cvakarna/springboot-Ignite/tree/master/IgniteSample>  

==>In this sample project "createOrGetCacheForSchema" and
"createOrGetCacheForCompany" are using the cachestore classes
"ItemcachestoreFactory" and "CompanyCachestorefactory" in the package
"com.cva.demo.cachestore.factory"

==>"createOrGetCacheForItem" using the ignite native persistence

==>If build the project  and run the program it will work fine

==>But If i move "CompanyCachestorefactory" class  to some other package
,lets say "com.cva.demo.cachestore.factory" to "com.cva.demo.cachestore" and
if i start the program it will through the exception like
"CompanyCachestorefactory" class not found exception in
"com.cva.demo.cachestore.factory" since we have moved that class to the
"com.cva.demo.cachestore".



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Roman Guseinov Roman Guseinov
Reply | Threaded
Open this post in threaded view
|

Re: Data Loss while upgrading custom jar from old jar in server and client nodes

Hi,

I will try to reproduce this on my side. Thanks for reproducer.

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Roman Guseinov Roman Guseinov
Reply | Threaded
Open this post in threaded view
|

Re: Data Loss while upgrading custom jar from old jar in server and client nodes

In reply to this post by siva
Hi,

I checked the project from github. Using the proposed steps I wasn't able to
reproduce the issue.

It looks like the IDE somehow uses old class files. You can try to rebuild
module from IDE (after moving "CompanyCachestorefactory") or execute "mvn
clean install".

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Roman Guseinov Roman Guseinov
Reply | Threaded
Open this post in threaded view
|

Re: Data Loss while upgrading custom jar from old jar in server and client nodes

In reply to this post by Roman Guseinov
Hi,

I checked the project from github. Using the proposed steps I wasn't able to
reproduce the issue.

It looks like the IDE somehow uses old class files. You can try to rebuild
module from IDE (after moving "CompanyCachestorefactory") or execute "mvn
clean install".

I am quite sure that the issue isn't related to Ignite.

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
siva siva
Reply | Threaded
Open this post in threaded view
|

Re: Data Loss while upgrading custom jar from old jar in server and client nodes

Hi,

Thanks for checking out issue. I think its not about IDE issue.
Again same thing i have reproduce like bellow steps

1.run the program from IDE as client
2.copy jar to ignite libs folder and start the server
3.Then check previous message steps so that can able to reproduce the issue.
https://www.youtube.com/watch?v=COQiu2gi8ag&t=43s
<https://www.youtube.com/watch?v=COQiu2gi8ag&t=43s>  
I have attached the video link.Can you go through that video and check the
issue.


Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Andrew Mashenkov Andrew Mashenkov
Reply | Threaded
Open this post in threaded view
|

Re: Data Loss while upgrading custom jar from old jar in server and client nodes

Hi,

Looks bad.
Ignite node tries to restore cache configuration on startup and seems can't do it as old classes are lost.
Seems, it fails before cache configuration validation.

Also, I'm not sure we allow to rewrite cache config and the only way here is to recreate a cache.


On Tue, Mar 27, 2018 at 4:18 PM, siva <[hidden email]> wrote:
Hi,

Thanks for checking out issue. I think its not about IDE issue.
Again same thing i have reproduce like bellow steps

1.run the program from IDE as client
2.copy jar to ignite libs folder and start the server
3.Then check previous message steps so that can able to reproduce the issue.
https://www.youtube.com/watch?v=COQiu2gi8ag&t=43s
<https://www.youtube.com/watch?v=COQiu2gi8ag&t=43s>
I have attached the video link.Can you go through that video and check the
issue.


Thanks



--
Best regards,
Andrey V. Mashenkov
Regards,
Andrew.