[JBoss JIRA] (ISPN-4679) OsgiClassLoader needs null check when iterating bundles
by Niels Bertram (JIRA)
[ https://issues.jboss.org/browse/ISPN-4679?page=com.atlassian.jira.plugin.... ]
Niels Bertram updated ISPN-4679:
--------------------------------
Affects Version/s: 7.0.0.Final
> OsgiClassLoader needs null check when iterating bundles
> -------------------------------------------------------
>
> Key: ISPN-4679
> URL: https://issues.jboss.org/browse/ISPN-4679
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Beta1, 7.0.0.Final
> Reporter: Niels Bertram
> Assignee: Dan Berindei
> Priority: Minor
>
> {{org.infinispan.commons.util.OsgiClassLoader}} requires a null check when the bundle is retrieved from a WeakReference.
> {code:java}
> for (WeakReference<Bundle> ref : bundles) {
> final Bundle bundle = ref.get();
> // BUG: we may not get a bundle back from the weak reference, eg. if uninstalled or deactivated
> if (bundle.getState() == Bundle.ACTIVE) {
> try {
> final Class clazz = bundle.loadClass(name);
> if (clazz != null) {
> classCache.put(name, clazz);
> return clazz;
> }
> } catch (Exception ignore) {
> }
> }
> }
> {code}
> I am running 7.0.0.Beta1 on servicemix 5.1.1 and can't load this simple infinispan.xml:
> {code:xml}
> <infinispan xmlns="urn:infinispan:config:7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:7.0 http://infinispan.org/schemas/infinispan-config-7.0.xsd">
> <cache-container default-cache="default" name="TestContainer">
> <jmx domain="TestDomain" mbean-server-lookup="org.infinispan.jmx.PerThreadMBeanServerLookup" duplicate-domains="true"/>
> <!-- definitions of the caches -->
> <local-cache name="default" statistics="false">
> <locking concurrency-level="100" acquire-timeout="1000"/>
> <transaction mode="NONE" complete-timeout="3123" reaper-interval="123"/>
> </local-cache>
> </cache-container>
> </infinispan>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (ISPN-4679) OsgiClassLoader needs null check when iterating bundles
by Niels Bertram (JIRA)
[ https://issues.jboss.org/browse/ISPN-4679?page=com.atlassian.jira.plugin.... ]
Niels Bertram updated ISPN-4679:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/2831
> OsgiClassLoader needs null check when iterating bundles
> -------------------------------------------------------
>
> Key: ISPN-4679
> URL: https://issues.jboss.org/browse/ISPN-4679
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Beta1
> Reporter: Niels Bertram
> Assignee: Dan Berindei
> Priority: Minor
>
> {{org.infinispan.commons.util.OsgiClassLoader}} requires a null check when the bundle is retrieved from a WeakReference.
> {code:java}
> for (WeakReference<Bundle> ref : bundles) {
> final Bundle bundle = ref.get();
> // BUG: we may not get a bundle back from the weak reference, eg. if uninstalled or deactivated
> if (bundle.getState() == Bundle.ACTIVE) {
> try {
> final Class clazz = bundle.loadClass(name);
> if (clazz != null) {
> classCache.put(name, clazz);
> return clazz;
> }
> } catch (Exception ignore) {
> }
> }
> }
> {code}
> I am running 7.0.0.Beta1 on servicemix 5.1.1 and can't load this simple infinispan.xml:
> {code:xml}
> <infinispan xmlns="urn:infinispan:config:7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:7.0 http://infinispan.org/schemas/infinispan-config-7.0.xsd">
> <cache-container default-cache="default" name="TestContainer">
> <jmx domain="TestDomain" mbean-server-lookup="org.infinispan.jmx.PerThreadMBeanServerLookup" duplicate-domains="true"/>
> <!-- definitions of the caches -->
> <local-cache name="default" statistics="false">
> <locking concurrency-level="100" acquire-timeout="1000"/>
> <transaction mode="NONE" complete-timeout="3123" reaper-interval="123"/>
> </local-cache>
> </cache-container>
> </infinispan>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (ISPN-4679) OsgiClassLoader needs null check when iterating bundles
by Niels Bertram (JIRA)
Niels Bertram created ISPN-4679:
-----------------------------------
Summary: OsgiClassLoader needs null check when iterating bundles
Key: ISPN-4679
URL: https://issues.jboss.org/browse/ISPN-4679
Project: Infinispan
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Core
Affects Versions: 7.0.0.Beta1
Reporter: Niels Bertram
Assignee: Dan Berindei
Priority: Minor
{{org.infinispan.commons.util.OsgiClassLoader}} requires a null check when the bundle is retrieved from a WeakReference.
{code:java}
for (WeakReference<Bundle> ref : bundles) {
final Bundle bundle = ref.get();
// BUG: we may not get a bundle back from the weak reference, eg. if uninstalled or deactivated
if (bundle.getState() == Bundle.ACTIVE) {
try {
final Class clazz = bundle.loadClass(name);
if (clazz != null) {
classCache.put(name, clazz);
return clazz;
}
} catch (Exception ignore) {
}
}
}
{code}
I am running 7.0.0.Beta1 on servicemix 5.1.1 and can't load this simple infinispan.xml:
{code:xml}
<infinispan xmlns="urn:infinispan:config:7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:7.0 http://infinispan.org/schemas/infinispan-config-7.0.xsd">
<cache-container default-cache="default" name="TestContainer">
<jmx domain="TestDomain" mbean-server-lookup="org.infinispan.jmx.PerThreadMBeanServerLookup" duplicate-domains="true"/>
<!-- definitions of the caches -->
<local-cache name="default" statistics="false">
<locking concurrency-level="100" acquire-timeout="1000"/>
<transaction mode="NONE" complete-timeout="3123" reaper-interval="123"/>
</local-cache>
</cache-container>
</infinispan>
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (ISPN-4678) Trim down ExpandableMarshalledValueByteStream to the actual data length before storing in cache
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-4678?page=com.atlassian.jira.plugin.... ]
Martin Gencur updated ISPN-4678:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/2830
> Trim down ExpandableMarshalledValueByteStream to the actual data length before storing in cache
> -----------------------------------------------------------------------------------------------
>
> Key: ISPN-4678
> URL: https://issues.jboss.org/browse/ISPN-4678
> Project: Infinispan
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Beta1
> Reporter: Martin Gencur
> Assignee: Martin Gencur
>
> When storeAsBinary configuration flag is used, the ExpandableMarshalledValueByteStream is used to serialize objects to byte arrays.
> However, for value size up to 4kB, almost half of the space for each cache entry can be wasted because the ByteStream is stored as is - with the additional space for future expansion.
> For value size greater than 4kB, only additional 25% of actual value size can be wasted. But as these values can be quite large, the wasted space gets bigger too.
> It is not necessary to store ExpandableMarshalledValueByteStream as is and can be shrinked to actual data size before storing in cache.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (ISPN-4678) Trim down ExpandableMarshalledValueByteStream to the actual data length before storing in cache
by Martin Gencur (JIRA)
Martin Gencur created ISPN-4678:
-----------------------------------
Summary: Trim down ExpandableMarshalledValueByteStream to the actual data length before storing in cache
Key: ISPN-4678
URL: https://issues.jboss.org/browse/ISPN-4678
Project: Infinispan
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: Core
Affects Versions: 7.0.0.Beta1
Reporter: Martin Gencur
Assignee: Martin Gencur
When storeAsBinary configuration flag is used, the ExpandableMarshalledValueByteStream is used to serialize objects to byte arrays.
However, for value size up to 4kB, almost half of the space for each cache entry can be wasted because the ByteStream is stored as is - with the additional space for future expansion.
For value size greater than 4kB, only additional 25% of actual value size can be wasted. But as these values can be quite large, the wasted space gets bigger too.
It is not necessary to store ExpandableMarshalledValueByteStream as is and can be shrinked to actual data size before storing in cache.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (ISPN-4604) Race condition in the QueryInterceptor involving SearchFactory
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-4604?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-4604:
-----------------------------------------------
Adrian Nistor <anistor(a)redhat.com> changed the Status of [bug 1135553|https://bugzilla.redhat.com/show_bug.cgi?id=1135553] from NEW to MODIFIED
> Race condition in the QueryInterceptor involving SearchFactory
> --------------------------------------------------------------
>
> Key: ISPN-4604
> URL: https://issues.jboss.org/browse/ISPN-4604
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Embedded Querying, Test Suite - Query
> Affects Versions: 7.0.0.Alpha5
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 7.0.0.Beta1
>
>
> During perform work task in the QueryInterceptor, the underlying SearchFactory could be swapped (for example by some other thread calling SearchFactory.addClass) and temporarily return null when looking for indexBindings, and throws intermittent Exceptions like:
> {code}
> Caused by: org.hibernate.search.exception.SearchException: Unable to perform work. Entity Class is not @Indexed nor hosts @ContainedIn: class org.infinispan.query.test.VeryLongIndexNamedClass
> at org.hibernate.search.backend.impl.TransactionalWorker.performWork(TransactionalWorker.java:58)
> at org.infinispan.query.backend.QueryInterceptor.performSearchWorks(QueryInterceptor.java:233)
> at org.infinispan.query.backend.QueryInterceptor.performSearchWork(QueryInterceptor.java:227)
> at org.infinispan.query.backend.QueryInterceptor.updateIndexes(QueryInterceptor.java:221)
> at org.infinispan.query.backend.QueryInterceptor.processPutKeyValueCommand(QueryInterceptor.java:531)
> at org.infinispan.query.backend.QueryInterceptor.visitPutKeyValueCommand(QueryInterceptor.java:162)
> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:71)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:46)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (ISPN-4627) QueryInterceptor start() event mutates the SearchFactory multiple times
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-4627?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-4627:
-----------------------------------------------
Adrian Nistor <anistor(a)redhat.com> changed the Status of [bug 1135553|https://bugzilla.redhat.com/show_bug.cgi?id=1135553] from NEW to MODIFIED
> QueryInterceptor start() event mutates the SearchFactory multiple times
> -----------------------------------------------------------------------
>
> Key: ISPN-4627
> URL: https://issues.jboss.org/browse/ISPN-4627
> Project: Infinispan
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Embedded Querying
> Reporter: Sanne Grinovero
> Assignee: Sanne Grinovero
> Priority: Minor
> Fix For: 7.0.0.Beta1
>
>
> Just spotted while reviewing unrelated patches:
> the {{@Start}} annotated method of component {{QueryInterceptor}} loops throught the known entries of the {{clusterRegistry}} field, and will reboot the {{SearchFactory}} once for each entry.
> It's important to use the capability to pass multiple class types at once when mutating the SearchFactory, as this is an extremely slow operation, and especially in this case, if it's a node joining an existing cluster we expect to see a considerable amount of indexed types (probably all of them).
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months