This project is archived and is in readonly mode.

#6329 ✓stale
Matthijs Langenberg

[PATCH] Prevent ActiveRecord SessionStore from saving non-dirty sessions.

Reported by Matthijs Langenberg | January 24th, 2011 @ 10:44 AM

By default, Rails saves the session after each request to the database.
When executing multiple XHR requests in parallel, this may result in a database lock. Because all XHR requests are trying to UPDATE the same session record (with the same data).
This patch fixes this, by comparing the unmarshaled new and original data hashes. And only saving them if they differ.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>