[JBoss JIRA] Created: (JBCACHE-1495) the searchable cache indexes are not updated if there were data manipulation in transaction or batch
by Yan Falken (JIRA)
the searchable cache indexes are not updated if there were data manipulation in transaction or batch
-----------------------------------------------------------------------------------------------------
Key: JBCACHE-1495
URL: https://jira.jboss.org/jira/browse/JBCACHE-1495
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: SearchableCache
Environment: searchable cache version 1.0.0 GA
Reporter: Yan Falken
Assignee: Manik Surtani
Priority: Blocker
// runnable unit test:
package problems;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.ProvidedId;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
import org.jboss.cache.*;
import org.jboss.cache.loader.jdbm.JdbmCacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.search.SearchableCacheFactory;
import org.jboss.cache.search.SearchableCache;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.index.Term;
import static org.testng.AssertJUnit.*;
import java.util.Properties;
import java.io.Serializable;
@Test(groups = {"unit"}, sequential = true)
public class IndexingInTransaction {
private static final Fqn fname = Fqn.fromString("blah");
private Cache coreCache;
private SearchableCache searchableCache;
Node node;
public IndexingInTransaction() {
init();
}
@BeforeMethod
public void init() {
CacheFactory factory = new DefaultCacheFactory();
Configuration c = new Configuration();
c.setInvocationBatchingEnabled(true);
CacheLoaderConfig clc = new CacheLoaderConfig();
JdbmCacheLoaderConfig jclc = new JdbmCacheLoaderConfig();
jclc.setAsync(false);
jclc.setFetchPersistentState(false);
jclc.setIgnoreModifications(false);
jclc.setPurgeOnStartup(true);
jclc.setLocation("/tmp/c1");
clc.addIndividualCacheLoaderConfig(jclc);
c.setCacheLoaderConfig(clc);
coreCache = factory.createCache(c, false);
SearchableCacheFactory f = new SearchableCacheFactory();
Properties p = new Properties();
p.put("hibernate.search.default.indexBase", "/tmp/c1idx");
searchableCache = f.createSearchableCache(coreCache, p, Entity.class);
searchableCache.create();
searchableCache.start();
node = searchableCache.getRoot().addChild(fname);
}
@Test
public void testPutEntitiesWithoutTransaction() {
for (int i = 1; i <= 10; i++) {
Entity e = getEntity(i);
System.out.println("caching: " + e);
Node c = node.addChild(Fqn.fromString(e.getName()));
c.put(""+ e.getId(), e);
}
assertFalse(searchableCache.createQuery(
Entity.searchByName("Name5")).list().isEmpty());
}
@Test
public void testPutEntitiesWithTransaction() throws Exception {
((CacheSPI)(coreCache)).getTransactionManager().begin();
for (int i = 11; i <= 20; i++) {
Entity e = getEntity(i);
System.out.println("caching: " + e);
Node c = node.addChild(Fqn.fromString(e.getName()));
c.put(""+ e.getId(), e);
}
((CacheSPI)(coreCache)).getTransactionManager().commit();
assertFalse(searchableCache.createQuery(
Entity.searchByName("Name15")).list().isEmpty());
}
Entity getEntity(long id) {
return new Entity(id, "Name" + id, "Surname" + id, true);
}
// public static void main(String[] args) {
// IndexingInTransaction stb = new IndexingInTransaction();
// stb.init();
// }
}
@ProvidedId
@Indexed
class Entity implements Serializable {
public static final String IDX_NAME = "name";
public static final String IDX_SURNAME = "surname";
private long id;
@Field(store = Store.YES)
private String name;
@Field (store = Store.YES)
private String surname;
private boolean dead;
Entity(long id, String name, String surname, boolean dead) {
this.id = id;
this.name = name;
this.surname = surname;
this.dead = dead;
}
public long getId() {
return id;
}
public String getName() {
return name;
}
public String getSurname() {
return surname;
}
public boolean isDead() {
return dead;
}
public static Query searchByName(String name) {
BooleanQuery query = new BooleanQuery();
query.add(new TermQuery(
new Term(Entity.IDX_NAME,
name.toLowerCase())),
BooleanClause.Occur.MUST);
return query;
}
@Override
public String toString() {
return "Entity{" +
"id=" + id +
", name='" + name + '\'' +
", surname='" + surname + '\'' +
", dead=" + dead +
'}';
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBCACHE-1517) Possibility of upgrading to JGroups 2.8 ?
by Galder Zamarreno (JIRA)
Possibility of upgrading to JGroups 2.8 ?
-----------------------------------------
Key: JBCACHE-1517
URL: https://jira.jboss.org/jira/browse/JBCACHE-1517
Project: JBoss Cache
Issue Type: Thirdparty Change
Security Level: Public (Everyone can see)
Components: Clustering
Affects Versions: 3.2.0.GA
Reporter: Galder Zamarreno
Assignee: Manik Surtani
Can we upgrade JBC 3.2 to use JGroups 2.8? Bela said JGroups 2.6 and 2.8 don't have on the wire
compatibility, so if JBC 3.2 and JBC 3.1 clusters would not be able to cluster.
org.jboss.cache.buddyreplication.NextMemberBuddyLocator is using IpAddress to figure out if candidate
and data owner are in the same machine:
// assume they're both IpAddresses??
InetAddress inetC = ((IpAddress) candidate).getIpAddress();
InetAddress inetD = ((IpAddress) dataOwner).getIpAddress();
There's also some test classes making use of IpAddress, i.e. CacheJmxWrapperTest and GlobalTransactionTest
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 4 months
[JBoss JIRA] Created: (JBCACHE-1432) Cache corrupted by 64bit windows member
by Bill Middleton (JIRA)
Cache corrupted by 64bit windows member
---------------------------------------
Key: JBCACHE-1432
URL: https://jira.jboss.org/jira/browse/JBCACHE-1432
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Cache loaders
Affects Versions: 2.2.1.CR1
Environment: Windows 64bit OS with either 32 or 64bit jvm
in cluster with any linux OS (32 or 64bit) with any linux jvm.
Reporter: Bill Middleton
Assignee: Manik Surtani
Fix For: 3.1.0
Hello. We've run into some trouble in attempting to bring a 64bit windows machine into an existing cluster. The cluster has (had) two 64bit linux members and was running fine when we attempted to insert a 64bit windows machine into the cluster. Anytime the 64bit windows machine wrote a node, the node was thereafter unreadable by either of the original cluster members. Exceptions of the following form were thrown by the other members (will attach stacktrace as comment)
I attempted to get help on this issue in the user forum, but it seems that nobody else is running 64bit windows as a cluster member with other OS's in the cluster. I hope perhaps someone can at least confirm this now formally?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months