diff --git a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/node-common-SqlMap.xml b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/node-common-SqlMap.xml
index 52f729b194..256ba83850 100644
--- a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/node-common-SqlMap.xml
+++ b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/node-common-SqlMap.xml
@@ -527,7 +527,7 @@
-
-
-
-
delete from alf_node_properties
where
diff --git a/config/alfresco/messages/action-config_ja.properties b/config/alfresco/messages/action-config_ja.properties
index d0a68e6ac2..fabc06f3b4 100755
--- a/config/alfresco/messages/action-config_ja.properties
+++ b/config/alfresco/messages/action-config_ja.properties
@@ -115,8 +115,8 @@ move.assoc-name.display-label=\u95a2\u9023\u540d
mail.title=E\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b
mail.description=\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u30de\u30c3\u30c1\u3059\u308b\u3068\u3001\u3053\u308c\u306b\u3088\u308a\u30e6\u30fc\u30b6\u30fc\u306e\u30ea\u30b9\u30c8\u306bE\u30e1\u30fc\u30eb\u304c\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002
-mail.to.display-label=\u7d42\u4e86\u65e5
-mail.to_many.display-label=\u7d42\u4e86\u65e5
+mail.to.display-label=\u5b9b\u5148
+mail.to_many.display-label=\u5b9b\u5148
mail.subject.display-label=\u4ef6\u540d
mail.text.display-label=\u672c\u6587
mail.from.display-label=\u958b\u59cb\u65e5
diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml
index 533f09d56f..1f67fa5b3f 100644
--- a/config/alfresco/patch/patch-services-context.xml
+++ b/config/alfresco/patch/patch-services-context.xml
@@ -3372,7 +3372,7 @@
-
+
patch.db-V4.2-upgrade-to-activiti-5.10
patch.upgradeToActiviti5-10.description
0
diff --git a/source/java/org/alfresco/filesys/alfresco/RepositoryDiskInterface.java b/source/java/org/alfresco/filesys/alfresco/RepositoryDiskInterface.java
index 29c6444b6c..ffee3936b0 100644
--- a/source/java/org/alfresco/filesys/alfresco/RepositoryDiskInterface.java
+++ b/source/java/org/alfresco/filesys/alfresco/RepositoryDiskInterface.java
@@ -69,14 +69,12 @@ public interface RepositoryDiskInterface
/**
* CloseFile.
*
- * @param session // temp until refactor
- * @param tree // temp until refactor
* @param rootNode
* @param fromPath - the source node
* @param toPath - the target node
* @throws FileNotFoundException
*/
- public void closeFile(SrvSession session, TreeConnection tree, NodeRef rootNode, String Path, NetworkFile file) throws IOException;
+ public void closeFile(NodeRef rootNode, String Path, NetworkFile file) throws IOException;
/**
*
diff --git a/source/java/org/alfresco/filesys/repo/CommandExecutorImpl.java b/source/java/org/alfresco/filesys/repo/CommandExecutorImpl.java
index 98b7b1fbdd..55207718de 100644
--- a/source/java/org/alfresco/filesys/repo/CommandExecutorImpl.java
+++ b/source/java/org/alfresco/filesys/repo/CommandExecutorImpl.java
@@ -235,7 +235,7 @@ public class CommandExecutorImpl implements CommandExecutor
{
logger.debug("close file command");
CloseFileCommand c = (CloseFileCommand)command;
- repositoryDiskInterface.closeFile(sess, tree, c.getRootNodeRef(), c.getPath(), c.getNetworkFile());
+ repositoryDiskInterface.closeFile(c.getRootNodeRef(), c.getPath(), c.getNetworkFile());
}
else if(command instanceof ReduceQuotaCommand)
{
diff --git a/source/java/org/alfresco/filesys/repo/ContentDiskDriver2.java b/source/java/org/alfresco/filesys/repo/ContentDiskDriver2.java
index 4ed6c35965..7148bda4f2 100644
--- a/source/java/org/alfresco/filesys/repo/ContentDiskDriver2.java
+++ b/source/java/org/alfresco/filesys/repo/ContentDiskDriver2.java
@@ -2715,30 +2715,13 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
*
* @exception java.io.IOException If an error occurs.
*/
- public void closeFile(SrvSession session, TreeConnection tree, NodeRef rootNode, String path, NetworkFile file) throws IOException
+ public void closeFile(NodeRef rootNode, String path, NetworkFile file) throws IOException
{
if ( logger.isDebugEnabled())
{
logger.debug("Close file:" + path + ", readOnly=" + file.isReadOnly() );
}
- // Check if there is an oplock on the file
-
- if ( file.hasOpLock()) {
-
- // Release the oplock
-
- OpLockInterface flIface = (OpLockInterface) this;
- OpLockManager oplockMgr = flIface.getOpLockManager(session, tree);
-
- oplockMgr.releaseOpLock( file.getOpLock().getPath());
-
- // DEBUG
-
- if ( logger.isDebugEnabled())
- logger.debug("Released oplock for closed file, file=" + file.getFullName());
- }
-
if( file instanceof PseudoNetworkFile)
{
file.close();
diff --git a/source/java/org/alfresco/filesys/repo/LegacyFileStateDriver.java b/source/java/org/alfresco/filesys/repo/LegacyFileStateDriver.java
index c5464d4add..3dd4f32280 100644
--- a/source/java/org/alfresco/filesys/repo/LegacyFileStateDriver.java
+++ b/source/java/org/alfresco/filesys/repo/LegacyFileStateDriver.java
@@ -38,6 +38,8 @@ import org.alfresco.jlan.server.filesys.cache.FileState;
import org.alfresco.jlan.server.filesys.cache.FileStateCache;
import org.alfresco.jlan.server.filesys.cache.NetworkFileStateInterface;
import org.alfresco.jlan.server.filesys.pseudo.PseudoFile;
+import org.alfresco.jlan.server.locking.OpLockInterface;
+import org.alfresco.jlan.server.locking.OpLockManager;
import org.alfresco.jlan.smb.SharingMode;
import org.alfresco.model.ContentModel;
import org.alfresco.util.PropertyCheck;
@@ -295,6 +297,21 @@ public class LegacyFileStateDriver implements ExtendedDiskInterface
try
{
+ if ( param.hasOpLock()) {
+
+ // Release the oplock
+
+ OpLockInterface flIface = (OpLockInterface) this;
+ OpLockManager oplockMgr = flIface.getOpLockManager(sess, tree);
+
+ oplockMgr.releaseOpLock( param.getOpLock().getPath());
+
+ // DEBUG
+
+ if ( logger.isDebugEnabled())
+ logger.debug("Released oplock for closed file, file=" + param.getFullName());
+ }
+
diskInterface.closeFile(sess, tree, param);
if(tctx.hasStateCache())
@@ -366,7 +383,21 @@ public class LegacyFileStateDriver implements ExtendedDiskInterface
public void deleteFile(SrvSession sess, TreeConnection tree, String name)
throws IOException
{
+ ContentContext tctx = (ContentContext) tree.getContext();
+
diskInterface.deleteFile(sess, tree, name);
+
+ if(tctx.hasStateCache())
+ {
+ FileStateCache cache = tctx.getStateCache();
+ FileState fstate = cache.findFileState( name, false);
+
+ if(fstate != null)
+ {
+ fstate.setFileStatus(FileStatus.NotExist);
+ fstate.setOpenCount(0);
+ }
+ }
}
@Override
diff --git a/source/java/org/alfresco/filesys/repo/NodeMonitor.java b/source/java/org/alfresco/filesys/repo/NodeMonitor.java
index 4ce21f40a2..e84b183fbc 100644
--- a/source/java/org/alfresco/filesys/repo/NodeMonitor.java
+++ b/source/java/org/alfresco/filesys/repo/NodeMonitor.java
@@ -713,6 +713,10 @@ public class NodeMonitor extends TransactionListenerAdapter
// Mark the file/folder as no longer existing
fState.setFileStatus(FileStatus.NotExist);
+ fState.setAllocationSize(0);
+ fState.setOpenCount(0);
+
+ // What about oplocks that are on the deleted file?
// DEBUG
diff --git a/source/java/org/alfresco/repo/domain/node/ibatis/NodeDAOImpl.java b/source/java/org/alfresco/repo/domain/node/ibatis/NodeDAOImpl.java
index 0b2a31ca21..b846608adb 100644
--- a/source/java/org/alfresco/repo/domain/node/ibatis/NodeDAOImpl.java
+++ b/source/java/org/alfresco/repo/domain/node/ibatis/NodeDAOImpl.java
@@ -1656,7 +1656,6 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
*/
public static class MySQL extends NodeDAOImpl
{
- private static final String DELETE_NODE_PROPS_BY_TXN_COMMIT_TIME_MYSQL = "alfresco.node.delete_NodePropsByTxnCommitTime_MySQL";
private static final String DELETE_TXNS_UNUSED_MYSQL = "alfresco.node.delete_Txns_Unused_MySQL";
private SqlSessionTemplate template;
@@ -1667,26 +1666,6 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
this.template = sqlSessionTemplate;
}
- @Override
- protected int deleteNodesByCommitTime(long maxTxnCommitTimeMs)
- {
- // Get the deleted nodes
- Pair deletedTypePair = qnameDAO.getQName(ContentModel.TYPE_DELETED);
- if (deletedTypePair == null)
- {
- // Nothing to do
- return 0;
- }
- TransactionQueryEntity query = new TransactionQueryEntity();
- query.setTypeQNameId(deletedTypePair.getFirst());
- query.setMaxCommitTime(maxTxnCommitTimeMs);
- // TODO: Fix ALF-16030 Use ON DELETE CASCADE for node aspects and properties
- // First clean up properties
- template.delete(DELETE_NODE_PROPS_BY_TXN_COMMIT_TIME_MYSQL, query);
- // Finally remove the nodes
- return template.delete(DELETE_NODES_BY_TXN_COMMIT_TIME, query);
- }
-
@Override
public int deleteTxnsUnused(long fromCommitTime, long toCommitTime)
{