Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

#10170 closed defect (fixed)

session purge don't purge session_attribute

Reported by: marius.rieder@… Owned by: Remy Blank
Priority: high Milestone: 0.12.3
Component: admin/console Version: 0.12-stable
Severity: normal Keywords: session purge bitesized
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

session purge calls _do_purge from web/session.py [1]

There all session rows older then age are deleted. In a secound step all session_attribute which link to a session older then age are deleted. As the sessions are alredy deleted nothing happens.

A call which deletes all session_attribute not linking to a session would to the trick.

DELETE FROM session_attribute WHERE sid NOT IN (SELECT sid FROM session);

For sqlite a vacuum call would be nice to resize the database.

[1] http://trac.edgewall.org/browser/branches/0.12-stable/trac/web/session.py#L485

Attachments (0)

Change History (2)

comment:1 by Remy Blank, 14 years ago

Component: generaladmin/console
Keywords: bitesized added
Owner: set to Remy Blank
Priority: normalhigh

Indeed, that's wrong. Your suggestion of deleting all attributes not linked to a session makes perfect sense, as this will also remove any stale attributes that may still be left around.

Would you like to try and provide a patch?

comment:2 by Remy Blank, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in [10689], with an updated unit test.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.