-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session.getDataHashCode not equals Arrays.hashCode( attributesData ) when session attributes whithout changes by msm-kryo-serializer #334
Comments
version info: <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:172.16.50.65:11211"
requestUriIgnorePattern=".*\.(png|gif|jpg|css|js)$"
sticky="false"
sessionBackupAsync="false"
sessionBackupTimeout="1800000"
copyCollectionsForSerialization="false"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"/> |
Thanks for this detailed report! AFAICS the two request logs show a different order of the attributes (attributesData), which most probably explains the different hashcode. Therefore we'd have to sort attributes before computing the hashcode. WDYT? |
Thanks for the reply! |
Right, I meant to sort the attributes (the result of |
Thank you very much! I got the same hashcode when the attributes been sorted. |
session will be backup when _session.getDataHashCode != Arrays.hashCode( attributesData ) ,sometiems, session attributes without any changes, but attributesData has changed .
For example:
put two attributes into session, (iccid = 1234 , cityCode = heibei )
first access log:
second access log
in this case, session will be covered in concurrent requests even if the attributes have not changes.
If Req_A is a get request, just read session attributes ,Req_B is a post request ,modify session attributes .
Session will be covered when Req_A finished.
So, i will get the attribute from session that is set by Req_B is null in the next request.
How to solve this question?
The text was updated successfully, but these errors were encountered: