Fórumok

Delete user on Cluster

xun ren, módosítva 11 év-val korábban

Delete user on Cluster

Junior Member Bejegyzések: 81 Csatlakozás dátuma: 2008.04.01. Legújabb bejegyzések
Hello,

I am developping under Liferay 5.2.3 CE. I've taken a look at the source of this version that every time we delete a user, it will call the UserIndexer to delete the index and empty the permissoin cache.

Like this :
UserIndexer.deleteUser(user.getCompanyId(), user.getUserId());


Behind this code, in the class, in the "com.liferay.portlet.enterpriseadmin.util.UserIndexer" class,
SearchEngineUtil.deleteDocument(companyId, getUserUID(userId));
is called.

Question : Is the delete of index/document of user is done on all of the instances of my application server on cluster. For example, we have four instances of JBoss Server. We encountered a problem of indexation and on the four different instances, the total of users is not the same.

If the delete of index is only done on the current instance of JBoss, what can we do to make it happen on the other instances, too ? If we need to update the version of Liferay, then which version minimum should we choose ?

Thanks a lot.
thumbnail
Amos Fong, módosítva 11 év-val korábban

RE: Delete user on Cluster

Liferay Legend Bejegyzések: 2047 Csatlakozás dátuma: 2008.10.07. Legújabb bejegyzések
Hi,

Do you have this property set?

    #
    # Set this to true if you want the portal to replicate an index write across
    # all members of the cluster. This is useful in some clustered environments
    # where you wish each server instance to have its own copy of the Lucene
    # search index. This is only relevant when using the default Lucene indexing
    # engine.
    #
    lucene.replicate.write=false


I assume you have cluster.link.enabled too right?
thumbnail
Sandeep Nair, módosítva 11 év-val korábban

RE: Delete user on Cluster

Liferay Legend Bejegyzések: 1744 Csatlakozás dátuma: 2008.11.06. Legújabb bejegyzések
Hi,

Since you are using Liferay 5.2.3, I am not sure if cluster link was supported in that version.

The possible ways in 5.2.3 as far as I remember was

Storing index in database(Not recommended)
Storing lucene indexes in SAN (Not recommended)
Solr (Recommended but would require separate solr server)
xun ren, módosítva 11 év-val korábban

RE: Delete user on Cluster

Junior Member Bejegyzések: 81 Csatlakozás dátuma: 2008.04.01. Legújabb bejegyzések
Sandeep Nair:
Hi,

Since you are using Liferay 5.2.3, I am not sure if cluster link was supported in that version.

The possible ways in 5.2.3 as far as I remember was

Storing index in database(Not recommended)
Storing lucene indexes in SAN (Not recommended)
Solr (Recommended but would require separate solr server)


Yes, you are right. Cluster link doesn't exist in this version. We've considerated to use the first two options you refered above. But why it is not recommended ?
I don't know what is "Solr". Could please explain me a bit ? Thanks a lot.

Denis.
thumbnail
Sandeep Nair, módosítva 11 év-val korábban

RE: Delete user on Cluster

Liferay Legend Bejegyzések: 1744 Csatlakozás dátuma: 2008.11.06. Legújabb bejegyzések
xun ren:


Yes, you are right. Cluster link doesn't exist in this version. We've considerated to use the first two options you refered above. But why it is not recommended ?
I don't know what is "Solr". Could please explain me a bit ? Thanks a lot.

Denis.


1) It can be very slow if you store lucene indexes in database and lots of db space used in there
2) If two processes write to the same index file in SAN, sometimes it may cause problem as lucene does not guarantee the integrity. But again it all depends on SAN providers, because some do handle such situations.

Regards,
Sandeep
thumbnail
Hitoshi Ozawa, módosítva 11 év-val korábban

RE: Delete user on Cluster

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
I was getting time out on one of the server when I tried to save index in a database and did a reindex.

When using SAN, it's necessary to use one that do version control.
xun ren, módosítva 11 év-val korábban

RE: Delete user on Cluster

Junior Member Bejegyzések: 81 Csatlakozás dátuma: 2008.04.01. Legújabb bejegyzések
Amos Fong:
Hi,

Do you have this property set?

    #
    # Set this to true if you want the portal to replicate an index write across
    # all members of the cluster. This is useful in some clustered environments
    # where you wish each server instance to have its own copy of the Lucene
    # search index. This is only relevant when using the default Lucene indexing
    # engine.
    #
    lucene.replicate.write=false


I assume you have cluster.link.enabled too right?



Hi, It seams that, in the version 5.2.3 CE, there is no properties "cluster.link.enabled" or "lucene.replicate.write". It exists in the versions after.
So the answer is we do not have these properties set.

Thanks a lot.
thumbnail
Hitoshi Ozawa, módosítva 11 év-val korábban

RE: Delete user on Cluster

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
If you don't have performance problem, another choice is to disable indexing on user (i.e.. users.search.with.index=true
I'm not sure if this feature was implemented in which version

http://issues.liferay.com/browse/LPS-3543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
xun ren, módosítva 11 év-val korábban

RE: Delete user on Cluster

Junior Member Bejegyzések: 81 Csatlakozás dátuma: 2008.04.01. Legújabb bejegyzések
Hitoshi Ozawa:
If you don't have performance problem, another choice is to disable indexing on user (i.e.. users.search.with.index=true
I'm not sure if this feature was implemented in which version

http://issues.liferay.com/browse/LPS-3543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel



Hi, it seems that, it is found in Liferay 5.2.3 CE, but the correction is commited for the enterprise edition. There is no support for CE. Right ?