jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r767427 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java
Date Wed, 22 Apr 2009 09:16:03 GMT
Author: thomasm
Date: Wed Apr 22 09:16:01 2009
New Revision: 767427

URL: http://svn.apache.org/viewvc?rev=767427&view=rev
Log:
JCR-2063 FileDataStore: garbage collection can delete files that are still needed

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java?rev=767427&r1=767426&r2=767427&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java
Wed Apr 22 09:16:01 2009
@@ -68,6 +68,11 @@
     private static final int DEFAULT_MIN_RECORD_LENGTH = 100;
 
     /**
+     * The maximum last modified time resolution of the file system.
+     */
+    private static final int ACCESS_TIME_RESOLUTION = 2000;
+
+    /**
      * Name of the directory used for temporary files.
      * Must be at least 3 characters.
      */
@@ -134,7 +139,7 @@
             }
             if (minModifiedDate != 0 && file.canWrite()) {
                 if (file.lastModified() < minModifiedDate) {
-                    file.setLastModified(System.currentTimeMillis());
+                    file.setLastModified(System.currentTimeMillis() + ACCESS_TIME_RESOLUTION);
                 }
             }
             usesIdentifier(identifier);



Mime
View raw message