Closed GoogleCodeExporter closed 9 years ago
Thanks for reporting this! Can you point out which code is buggy / should be
changed?
Original comment by martin.grotzke
on 7 Aug 2014 at 11:02
Method loadSessionValidityInfoForValidityKey is called with e.g.
"validity:prefix_ASDFE213SRF23". _storageKeyFormat.format() turns it into
"prefix_validity:prefix_ASDFE213SRF23".
I didn't track down everything. Fact is that loading a session from the backup
memcached node doesn't work because memcached is queried for "validity:..."
instead of "prefix_validity:...".
I did the simple fix below, and things started to work for me. However the code
is not clean with regard to memcached keys used: Meaning the prefix is
contained multiple times in some keys which is a waste of mem and a source of
future bugs.
let me congrat here for a great software product to mitigate the offensive tone
above. I appreciate the concepts and design of msm a lot.
here is my current diff against 1.8.2:
diff --git a/core/src/main/java/de/javakaffee/web/msm/LockingStrategy.java
b/core/src/main/java/de/javakaffee/web/msm/LockingStrategy.java
index 67668b3..4a891ed 100644
--- a/core/src/main/java/de/javakaffee/web/msm/LockingStrategy.java
+++ b/core/src/main/java/de/javakaffee/web/msm/LockingStrategy.java
@@ -330,7 +330,7 @@ public abstract class LockingStrategy {
@CheckForNull
protected SessionValidityInfo loadSessionValidityInfoForValidityKey( @Nonnull final String validityInfoKey ) {
- final byte[] validityInfo = (byte[]) _memcached.get(
_storageKeyFormat.format( validityInfoKey ) );
+ final byte[] validityInfo = (byte[]) _memcached.get( validityInfoKey );
return validityInfo != null ? decode( validityInfo ) : null;
}
Original comment by bernard....@metamarketplace.com
on 8 Aug 2014 at 7:16
Should be fixed in the attached jar, replaces
memcached-session-manager-1.8.2.jar. Can you tell if this fixes the issue for
you?
Original comment by martin.grotzke
on 6 Nov 2014 at 11:09
Attachments:
I just release msm 1.8.3 with this fix.
Original comment by martin.grotzke
on 6 Nov 2014 at 10:01
Original issue reported on code.google.com by
bernard....@metamarketplace.com
on 6 Aug 2014 at 11:31