magro/memcached-session-manager

msmStatCachedDataSizeInfo not being updated when using KryoTranscoder

jyothi-eroader opened this issue · 1 comments

My configuration looks as below
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager" memcachedNodes="n1:${MEMCACHED_NODE_01},n2:${MEMCACHED_NODE_02}" sticky="true" sessionBackupAsync="false" sessionBackupTimeout="5000" requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$" transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory" />

However, when I view the values for the msmStatCachedDataSizeInfo so that I can choose the right buffer size as I see errors due to buffer overflows, the value is always 0. Looking into the code I see that the KryoTranscoder does not implement the net.spy.memcached.transcoders.Transcoder interface which is decorated to mark this statistic.

This stat will be super useful for us to know the right size of the buffer rather than a trial an error approach. Knowing it up front would give us the power to determine if we should look at the content we put in or just bump up the buffer size.

magro commented

Thanks for reporting, it would be great if you could submit a PR for this!