-
1. Re: Using indexing with an async store
sannegrinovero Oct 12, 2010 12:14 PM (in response to craigching)1 of 1 people found this helpfulHi Craig,
I'm not sure about how this would work, but I'd expect the results to potentially miss some items, not to throw NPEs.
Please open an issue about this; it would be very nice if you could attach a testcase too, so that people looking into the issue is able to reproduce it.
-
2. Re: Using indexing with an async store
craigching Oct 13, 2010 10:26 AM (in response to sannegrinovero)Hi Sanne,
Thanks for your response. I mis-spoke a bit when I said there were NPEs, Infinispan isn't throwing the NPEs, my code is. What's happening is that the list returned from the query object has null entries in it. For instance, here's my code:
QueryHelper helper = new QueryHelper(cache, new Properties(), User.class);QueryFactory f = new QueryFactory(cache, helper);CacheQuery query = f.getBasicQuery("enabled", "true");System.out.println("Query took " + (System.currentTimeMillis() - begin) + " ms.");int hits = query.getResultSize();System.out.println("Found " + hits + " hits.");List found = query.list();for (Object o : found) {User u = (User)o;// if (u == null) System.out.println("ERROR!: found element is null");System.out.println("Username: " + u.getUsername() + ", email: " + u.getEmail());
{code} QueryHelper helper = new QueryHelper(cache, new Properties(), User.class);
QueryFactory f = new QueryFactory(cache, helper);
CacheQuery query = f.getBasicQuery("enabled", "true");
System.out.println("Query took " + (System.currentTimeMillis() - begin) + " ms.");
int hits = query.getResultSize();
System.out.println("Found " + hits + " hits.");
List found = query.list();
for (Object o : found) {
User u = (User)o;
if (u == null) System.out.println("ERROR!: found element is null");
System.out.println("Username: " + u.getUsername() + ", email: " + u.getEmail());
}
{code}So the list contains null items. I'm assuming you probably wouldn't want that to happen in any case, so I'll open up an issue for that with a test case.
-
3. Re: Using indexing with an async store
sannegrinovero Oct 13, 2010 10:57 AM (in response to craigching)yes please do and then link to the issue from this thread (and vice-versa).
thanks