emmerichLuang / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

Session Corruption : Kyro v/s Java Serialization #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
-----Original Message-----
From: Martin Grotzke [mailto:martin.grotzke@googlemail.com]
Sent: Thursday, November 28, 2013 6:20 PM
To: Siddharth Sharma
Cc: Vishal Meghani
Subject: Re: Reagrding Mecache-Session-Managr: Facing Issue with loading 
spymemcache client

When kryo cannot serialize an object it will throw an exception (so it's all or 
none) which should also appear in the log. Not 100% sure if the http request 
fails or succeeds (perhaps depends on the sessionBackupAsync prop).

Cheers,
Martin

On 11/28/2013 01:37 PM, Siddharth Sharma wrote:
> Martin,
> 
> Thanks a lot for prompt responses. Kyro worked for us but we couldn't find 
any alarm/warning which it raises for serialization exception. Does kyro 
guarantee atomic session replication i.e all or none? For now, we have extended 
JavaSerializationTranscoder and instead of gulping non-serializable field, 
we're  avoiding session replication altogether for that session.
> 
> We'll move this thread to the forum once closed as it will help others too.
> 
> Thanks,
> Sid
> ________________________________________
> From: Martin Grotzke [martin.grotzke@googlemail.com]
> Sent: 28 November 2013 16:56
> To: Vishal Meghani
> Cc: Siddharth Sharma
> Subject: Re: Reagrding Mecache-Session-Managr: Facing Issue with 
> loading spymemcache client
> 
> The JavaSerializationTranscoder was based on code from tomcat 
> (PersistentManager).
> 
> In your case you want to use the kryo serialization strategy, because 
> kryo does not depend on Serializable. The SetupAndConfiguration page 
> should provide all information you need to get it up and running.
> 
> Cheers,
> Martin
> 
> 
> On 11/28/2013 11:58 AM, Vishal Meghani wrote:
>> Hi Martin,
>>
>> By Corrupted Session we mean, that one of the attribute in the session goes 
missing or gets removed from session.
>>
>> We looked at your JavaSerializationTranscoder, as per our 
>> understanding , when you are trying to save session in memcache
>> - Code ignores an value which is not serializable
>> - Even then if it gets nonsserializable exception then it inserts 
>> "NOT_SERIALIZABLE_EXCEPTION" String
>>
>> Lot of things goes into session, we cannot afford any data getting lost just 
because it's not serializable. If that case occurs we term the session getting 
corrupted. In such case we would not want to maintain session over different 
nodes, and would expect a new session to get created.
>>
>> Martin, do Memcache Session Manager has the capability to achieve this, or 
some parameter through which we can ensure this.  Or is there any way by which 
we can find that such a case is happening do that we can deal with it 
accordingly.
>>
>> For now, we are observing the logs provided by memcache session manager to 
find such a scenario and we appreciate the level of info that it provides, its 
really helpful.
>>
>> Thanks & Regards,
>> Vishal Meghani
>>
>> -----Original Message-----
>> From: Martin Grotzke [mailto:martin.grotzke@googlemail.com]
>> Sent: Thursday, November 28, 2013 3:53 AM
>> To: Siddharth Sharma
>> Cc: Vishal Meghani
>> Subject: Re: Reagrding Mecache-Session-Managr: Facing Issue with 
>> loading spymemcache client
>>
>> What do you mean with corrupted sessions? What scenario do you have in mind 
where sessions could get corrupted?
>>
>> Cheers,
>> Martin
>>
>>
>> On 11/27/2013 09:36 AM, Siddharth Sharma wrote:
>>> Definitely Martin!
>>>
>>> Just wanted to check, how do we ensure sessions don't get corrupted? Is 
there any interceptor or plugin for this?

Original issue reported on code.google.com by VISH.THE...@gmail.com on 28 Nov 2013 at 1:06

GoogleCodeExporter commented 9 years ago
Ok, I assume you submitted this issue just "for the record", so there's no 
further action required.

Original comment by martin.grotzke on 29 Nov 2013 at 9:01