You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Peter Ertl (JIRA)" <ji...@apache.org> on 2009/07/07 23:52:14 UTC

[jira] Created: (WICKET-2357) (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts

(follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts
--------------------------------------------------------------------------------------------------

                 Key: WICKET-2357
                 URL: https://issues.apache.org/jira/browse/WICKET-2357
             Project: Wicket
          Issue Type: Bug
          Components: wicket
            Reporter: Peter Ertl


in WICKET-1158 there was some talk about cleaning up stale pagemap files of DiskPageStore on non-graceful container restarts (e.g. when doing kill -9). Last comment stated this issue will be fixed when related WICKET-1161 is fixed. However WICKET-1161 is fixed now and stale files are not cleaned up on container restarts where the container was not shut down gracefully.

Especially on high-volume sites lots of files could be left behind and as wicket creates the files it should also clean them up again. I could imagine some kind of (optional) low-priority cleanup background thread that removes files having a lastModifiedTime > threshold value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2357) (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728570#action_12728570 ] 

Johan Compagner commented on WICKET-2357:
-----------------------------------------

1 solution would be to not kill tomcat..
but always do a nice shutdown :)

> (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts
> --------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2357
>                 URL: https://issues.apache.org/jira/browse/WICKET-2357
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>         Attachments: WICKET-2357-1_3.patch, WICKET-2357-1_4.patch
>
>
> in WICKET-1158 there was some talk about cleaning up stale pagemap files of DiskPageStore on non-graceful container restarts (e.g. when doing kill -9). Last comment stated this issue will be fixed when related WICKET-1161 is fixed. However WICKET-1161 is fixed now and stale files are not cleaned up on container restarts where the container was not shut down gracefully.
> Especially on high-volume sites lots of files could be left behind and as wicket creates the files it should also clean them up again. I could imagine some kind of (optional) low-priority cleanup background thread that removes files having a lastModifiedTime > threshold value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2357) (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728676#action_12728676 ] 

Peter Ertl commented on WICKET-2357:
------------------------------------

@johan: full ack :-)

however this is not a perfect world but full of mistakes :-(

> (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts
> --------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2357
>                 URL: https://issues.apache.org/jira/browse/WICKET-2357
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>         Attachments: WICKET-2357-1_3.patch, WICKET-2357-1_4.patch
>
>
> in WICKET-1158 there was some talk about cleaning up stale pagemap files of DiskPageStore on non-graceful container restarts (e.g. when doing kill -9). Last comment stated this issue will be fixed when related WICKET-1161 is fixed. However WICKET-1161 is fixed now and stale files are not cleaned up on container restarts where the container was not shut down gracefully.
> Especially on high-volume sites lots of files could be left behind and as wicket creates the files it should also clean them up again. I could imagine some kind of (optional) low-priority cleanup background thread that removes files having a lastModifiedTime > threshold value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2357) (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2357.
-----------------------------------

      Assignee: Peter Ertl
    Resolution: Won't Fix

pete, reopen this when you are ready to work on this. not sure if it still applies after all this time.

> (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts
> --------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2357
>                 URL: https://issues.apache.org/jira/browse/WICKET-2357
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>            Assignee: Peter Ertl
>         Attachments: WICKET-2357-1_3.patch, WICKET-2357-1_4.patch
>
>
> in WICKET-1158 there was some talk about cleaning up stale pagemap files of DiskPageStore on non-graceful container restarts (e.g. when doing kill -9). Last comment stated this issue will be fixed when related WICKET-1161 is fixed. However WICKET-1161 is fixed now and stale files are not cleaned up on container restarts where the container was not shut down gracefully.
> Especially on high-volume sites lots of files could be left behind and as wicket creates the files it should also clean them up again. I could imagine some kind of (optional) low-priority cleanup background thread that removes files having a lastModifiedTime > threshold value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2357) (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Ertl updated WICKET-2357:
-------------------------------

    Attachment: WICKET-2357-1_4.patch
                WICKET-2357-1_3.patch

In order to implement a method of cleaning up expired / stale / orphaned DiskPageStore directories I would like to contribute the following methods to wicket:

DiskPageStore.getStoreFolder() --> convert from private to public

required to get access to the session folder for cleaning up purposes. also allows to override DiskPageStore and change the default location for serialized sessions.


File.deleteRecursively:

	/**
	 * delete a file or directory including its files and subdirectories
	 *
	 * @return <code>true</code> if deletion was successful, <code>false</code> otherwise
	 */

	public final boolean deleteRecursively()


required to wipe (expired) directories including it's content. also useful for any kind of file operation that requires killing a full directory with subdirectories.

File.lastModicationRecursively:

	/**
	 * return the latest modification time of a file or a folder including its files and subfolders
	 *
	 * @return modification time in milliseconds or <code>0</code> if file doesn't exist or I/O error occurred
	 */
	public long lastModificationRecursively()
	{
		return lastModificationRecursively(lastModified());
	}

returns the very last modification time of any file in a folder and below including the folder itself. this is helpful to determine the session folders that are older than for example one week in order to delete them. can be useful for any kind of disk caching to remove expired entries.

> (follow-up of WICKET-1158) DiskPageStore does not cleanup cache files after Web container restarts
> --------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2357
>                 URL: https://issues.apache.org/jira/browse/WICKET-2357
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>         Attachments: WICKET-2357-1_3.patch, WICKET-2357-1_4.patch
>
>
> in WICKET-1158 there was some talk about cleaning up stale pagemap files of DiskPageStore on non-graceful container restarts (e.g. when doing kill -9). Last comment stated this issue will be fixed when related WICKET-1161 is fixed. However WICKET-1161 is fixed now and stale files are not cleaned up on container restarts where the container was not shut down gracefully.
> Especially on high-volume sites lots of files could be left behind and as wicket creates the files it should also clean them up again. I could imagine some kind of (optional) low-priority cleanup background thread that removes files having a lastModifiedTime > threshold value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.