jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shash...@apache.org
Subject svn commit: r1703094 - /jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java
Date Tue, 15 Sep 2015 04:37:26 GMT
Author: shashank
Date: Tue Sep 15 04:37:26 2015
New Revision: 1703094

URL: http://svn.apache.org/r1703094
Log:
JCR-3906 Re-uploading local cache files take lot of time

Fix: When  object exists in S3, majority of time is taken to update lastModified of S3 object.
During initialization phase it is required to update timestamp. Added another check to avoid
that.

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

Modified: jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java?rev=1703094&r1=1703093&r2=1703094&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java
(original)
+++ jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java
Tue Sep 15 04:37:26 2015
@@ -993,7 +993,9 @@ public abstract class CachingDataStore e
         try {
             DataIdentifier identifier = new DataIdentifier(f.getName());
             usesIdentifier(identifier);
-            backend.write(identifier, f);
+            if (!backend.exists(identifier)) {
+                backend.write(identifier, f);
+            }
             if (updateAsyncUploadCache) {
                 String fileName = getFileName(identifier);
                 asyncWriteCache.remove(fileName);



Mime
View raw message