Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD

41929: ALF-12202: Solr Port display wrong labels on Edit form
          - Added solr.help.field.solr.port and solr.help.field.solr.port.ssl messages
   41940: Fix for ALF-16086 SOLR tracking does not include transformation status etc (error in header name)
   41958: Merged V4.1 to V4.1-BUG-FIX (RECORD ONLY)
            39973: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/V4.1: merged for KR => ALF-13404 (and CLOUD-438)
               39953: Refactored "Content I'm Editing" dashlet from synchronous (slowing down user dashboard initial display) to asynchronous client-side rendering.
            39976: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/V3.4-BUG-FIX: (record-only) - for KR (to ignore the hand merge of the dashlet changes from V3.4)
               39953: Refactored "Content I'm Editing" dashlet from synchronous (slowing down user dashboard initial display) to asynchronous client-side rendering. (ALF-13404)
            41129: ALF-15782: Merged V4.1-BUG-FIX to V4.1
               41032: Fix for ALF-15753	Infinite loop during Solr ACL indexing when ACL Changeset batch is empty
   41986: Merged PATCHES/V4.1.1 to V4.1-BUG-FIX
            41983: Merged V4.1 to PATCHES/V4.1.1
               41982: Merged DEV to V4.1
                  41962: ALF-16029: TransactionCleanupTest throws constraint violations
                     Use overrided deleteNodesByCommitTime() method in DAO for MSSQL. 
                  41977: ALF-16029: TransactionCleanupTest throws constraint violations.
                     Change delete_NodePropsByTxnCommitTime statement to be common for all DB dialects.
            41985: Merged V4.1 to PATCHES/V4.1.1 (RECORD ONLY)
               41129: ALF-15782: Merged V4.1-BUG-FIX to V4.1
                  41032: Fix for ALF-15753	Infinite loop during Solr ACL indexing when ACL Changeset batch is empty
               41654: Fix for ALF-15965 - hand merged back from rev 41653
               41968: Merged PATCHES/V4.1.1 to V4.1 (4.1.1)
   42045: Refactor of recent change to always release opLock on close.   Code needs to move out of the transactional layers to LegacyFileStateDriver.
   42052: Fix for ALF-952
          Merged BRANCHES/DEV to BRANCHES/DEV/V4.1-BUG-FIX
             41829: akovalchuk ALF-952: Message "Password must be between 3 and 256 characters in length" incorrect
                Configuration of max password length is now being picked up from ClientConfig (which reads it from password-max-length element of web-client-config.xml) and validated on backend using LoginBean.validatePassword method.
                Maximum password length is set to 255. Field "confirm" is checked only for exact matching to the field "password" at validation phase using LoginBean.validateMatch.
                Tenant username check now is made at validation phase together with other username validations in CreateUserWizard.validateUsername.
   42056: Merged HEAD to V4.1-BUG-FIX (RECORD ONLY)
            ALF-15987: merged Visio support in HEAD to V4.1-BUG-FIX.
   42111: SPANISH: Translation updates based on EN r41902, Fixes: ALF-15359, ALF-15682, ALF-15926
   42112: ITALIAN: Translation updates based on EN r41902, Fixes: ALF-15359, ALF-15682, ALF-15926
   42113: JAPANESE: Translation updates based on EN r41902, Fixes: ALF-15359, ALF-15682, ALF-15926
   42115: ALL LANGUAGES: Standardises on 24 hour display for all non-English languages. Fixes: ALF-15992 and related to ALF-13712
   42129: ALF-16098: Activiti upgrade to 5.10 (RECORD ONLY)
   42136: Last SOLR side update for ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups
   42137: ALF-16132 - Problems with Versionable onUpdate Policy execution and JLan exception handling
          fixed third sub issue.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@42145 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2012-09-28 13:18:09 +00:00
parent 5d0b596321
commit ed48e2c4c9
9 changed files with 43 additions and 62 deletions

View File

@@ -527,7 +527,7 @@
<delete id="delete_NodePropsByTxnCommitTime" parameterType="TransactionQuery"> <delete id="delete_NodePropsByTxnCommitTime" parameterType="TransactionQuery">
<![CDATA[ <![CDATA[
delete from alf_node_properties np delete from alf_node_properties
where exists where exists
( (
select 1 select 1
@@ -536,26 +536,12 @@
join alf_transaction txn on (txn.id = node.transaction_id) join alf_transaction txn on (txn.id = node.transaction_id)
where where
node.type_qname_id = #{typeQNameId} and node.type_qname_id = #{typeQNameId} and
np.node_id = node.id and alf_node_properties.node_id = node.id and
txn.commit_time_ms < #{maxCommitTime} txn.commit_time_ms < #{maxCommitTime}
) )
]]> ]]>
</delete> </delete>
<delete id="delete_NodePropsByTxnCommitTime_MySQL" parameterType="TransactionQuery">
<![CDATA[
delete
np
from
alf_node_properties np
join alf_node node on (node.id = np.node_id)
join alf_transaction txn on (txn.id = node.transaction_id)
where
node.type_qname_id = #{typeQNameId} and
txn.commit_time_ms < #{maxCommitTime}
]]>
</delete>
<delete id="delete_NodeProperties" parameterType="NodeProperty"> <delete id="delete_NodeProperties" parameterType="NodeProperty">
delete from alf_node_properties delete from alf_node_properties
where where

View File

@@ -115,8 +115,8 @@ move.assoc-name.display-label=\u95a2\u9023\u540d
mail.title=E\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b 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.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.display-label=\u5b9b\u5148
mail.to_many.display-label=\u7d42\u4e86\u65e5 mail.to_many.display-label=\u5b9b\u5148
mail.subject.display-label=\u4ef6\u540d mail.subject.display-label=\u4ef6\u540d
mail.text.display-label=\u672c\u6587 mail.text.display-label=\u672c\u6587
mail.from.display-label=\u958b\u59cb\u65e5 mail.from.display-label=\u958b\u59cb\u65e5

View File

@@ -3372,7 +3372,7 @@
</property> </property>
</bean> </bean>
<bean id="patch.db-V4.2-upgrade-to-activiti-5.10" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch"> <bean id="patch.db-V4.2-upgrade-to-activiti-5.10" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
<property name="id"><value>patch.db-V4.2-upgrade-to-activiti-5.10</value></property> <property name="id"><value>patch.db-V4.2-upgrade-to-activiti-5.10</value></property>
<property name="description"><value>patch.upgradeToActiviti5-10.description</value></property> <property name="description"><value>patch.upgradeToActiviti5-10.description</value></property>
<property name="fixesFromSchema"><value>0</value></property> <property name="fixesFromSchema"><value>0</value></property>

View File

@@ -69,14 +69,12 @@ public interface RepositoryDiskInterface
/** /**
* CloseFile. * CloseFile.
* *
* @param session // temp until refactor
* @param tree // temp until refactor
* @param rootNode * @param rootNode
* @param fromPath - the source node * @param fromPath - the source node
* @param toPath - the target node * @param toPath - the target node
* @throws FileNotFoundException * @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;
/** /**
* *

View File

@@ -235,7 +235,7 @@ public class CommandExecutorImpl implements CommandExecutor
{ {
logger.debug("close file command"); logger.debug("close file command");
CloseFileCommand c = (CloseFileCommand)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) else if(command instanceof ReduceQuotaCommand)
{ {

View File

@@ -2715,30 +2715,13 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
* *
* @exception java.io.IOException If an error occurs. * @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()) if ( logger.isDebugEnabled())
{ {
logger.debug("Close file:" + path + ", readOnly=" + file.isReadOnly() ); 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) if( file instanceof PseudoNetworkFile)
{ {
file.close(); file.close();

View File

@@ -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.FileStateCache;
import org.alfresco.jlan.server.filesys.cache.NetworkFileStateInterface; import org.alfresco.jlan.server.filesys.cache.NetworkFileStateInterface;
import org.alfresco.jlan.server.filesys.pseudo.PseudoFile; 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.jlan.smb.SharingMode;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.util.PropertyCheck; import org.alfresco.util.PropertyCheck;
@@ -295,6 +297,21 @@ public class LegacyFileStateDriver implements ExtendedDiskInterface
try 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); diskInterface.closeFile(sess, tree, param);
if(tctx.hasStateCache()) if(tctx.hasStateCache())
@@ -366,7 +383,21 @@ public class LegacyFileStateDriver implements ExtendedDiskInterface
public void deleteFile(SrvSession sess, TreeConnection tree, String name) public void deleteFile(SrvSession sess, TreeConnection tree, String name)
throws IOException throws IOException
{ {
ContentContext tctx = (ContentContext) tree.getContext();
diskInterface.deleteFile(sess, tree, name); 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 @Override

View File

@@ -713,6 +713,10 @@ public class NodeMonitor extends TransactionListenerAdapter
// Mark the file/folder as no longer existing // Mark the file/folder as no longer existing
fState.setFileStatus(FileStatus.NotExist); fState.setFileStatus(FileStatus.NotExist);
fState.setAllocationSize(0);
fState.setOpenCount(0);
// What about oplocks that are on the deleted file?
// DEBUG // DEBUG

View File

@@ -1656,7 +1656,6 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
*/ */
public static class MySQL extends NodeDAOImpl 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 static final String DELETE_TXNS_UNUSED_MYSQL = "alfresco.node.delete_Txns_Unused_MySQL";
private SqlSessionTemplate template; private SqlSessionTemplate template;
@@ -1667,26 +1666,6 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
this.template = sqlSessionTemplate; this.template = sqlSessionTemplate;
} }
@Override
protected int deleteNodesByCommitTime(long maxTxnCommitTimeMs)
{
// Get the deleted nodes
Pair<Long, QName> 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 @Override
public int deleteTxnsUnused(long fromCommitTime, long toCommitTime) public int deleteTxnsUnused(long fromCommitTime, long toCommitTime)
{ {