[JBoss JIRA] (ISPN-9297) Prevent cache configuration that has L1 and exception based eviction
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-9297?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-9297:
-------------------------------
Summary: Prevent cache configuration that has L1 and exception based eviction (was: Prevent cace configuration that has L1 and exception based eviction)
> Prevent cache configuration that has L1 and exception based eviction
> --------------------------------------------------------------------
>
> Key: ISPN-9297
> URL: https://issues.jboss.org/browse/ISPN-9297
> Project: Infinispan
> Issue Type: Bug
> Reporter: William Burns
> Assignee: William Burns
> Fix For: 9.3.0.Final
>
>
> Exception based eviction is specifically around only keeping so much data in memory. There is no reason to have something like L1 in this case as it prevents using space for actual entries. It also would be quite confusing if a get caused an exception.
> We should prevent this configuration from occurring.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (ISPN-9297) Prevent cace configuration that has L1 and exception based eviction
by William Burns (JIRA)
William Burns created ISPN-9297:
-----------------------------------
Summary: Prevent cace configuration that has L1 and exception based eviction
Key: ISPN-9297
URL: https://issues.jboss.org/browse/ISPN-9297
Project: Infinispan
Issue Type: Bug
Reporter: William Burns
Assignee: William Burns
Fix For: 9.3.0.Final
Exception based eviction is specifically around only keeping so much data in memory. There is no reason to have something like L1 in this case as it prevents using space for actual entries. It also would be quite confusing if a get caused an exception.
We should prevent this configuration from occurring.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (IPROTO-56) DynamicEntity support in MarshallerProvider
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/IPROTO-56?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes commented on IPROTO-56:
-----------------------------------------
One solution (or hack), similar to OGM, is to have a ThreadLocal object that would store the type. The MarshallerProvider would then use this storage to return the correct marshaller:
{code:java}
class MarshallerProvider implements SerializationContext.MarshallerProvider {
...
public MarshallerProvider(ThreadLocalStorage typeContainer) {
this.threadLocalStorage = ...
}
@Override
public BaseMarshaller<?> getMarshaller(Class<?> javaClass) {
return new EntityMarshaller(threadLocalStorage.getType());
}
{code}
This solution needs careful testing as it's not guaranteed that the SerCtx is used to marshall and unmarshall from the same thread (this happens in the Hot Rod client)
> DynamicEntity support in MarshallerProvider
> -------------------------------------------
>
> Key: IPROTO-56
> URL: https://issues.jboss.org/browse/IPROTO-56
> Project: Infinispan ProtoStream
> Issue Type: Bug
> Reporter: Gustavo Fernandes
>
> The use case is a class that describe the entity. This class contains a 'type' and a list of properties. MarshallerProvider is used to associate a type with a marshaller that uses this 'type' to understand the fields and data types to read/write the stream.
> The type of the entity is contained in the entity itself, and when reading from the stream, this type is used to figure out the fields to read. During writes, though, the type is not involved so it's not possible to use the same strategy.
> Attached is a unit test to illustrate the situation. This is not necessarily a bug, it may be possible to achieve the usage of Dynamic Entities under other circumstances, or maybe the API needs to be extended.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (IPROTO-56) DynamicEntity support in MarshallerProvider
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/IPROTO-56?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes edited comment on IPROTO-56 at 6/15/18 7:46 AM:
------------------------------------------------------------------
One solution (or hack), similar to OGM, is to have a ThreadLocal object that would store the type. The MarshallerProvider would then use this storage to return the correct marshaller:
{code:java}
class MarshallerProvider implements SerializationContext.MarshallerProvider {
...
public MarshallerProvider(ThreadLocalStorage typeContainer) {
this.threadLocalStorage = ...
}
@Override
public BaseMarshaller<?> getMarshaller(Class<?> javaClass) {
return new EntityMarshaller(threadLocalStorage.getType());
}
{code}
This solution needs careful testing and as it's not guaranteed that the SerCtx is used to marshall and unmarshall from the same thread (this happens in the Hot Rod client)
was (Author: gustavonalle):
One solution (or hack), similar to OGM, is to have a ThreadLocal object that would store the type. The MarshallerProvider would then use this storage to return the correct marshaller:
{code:java}
class MarshallerProvider implements SerializationContext.MarshallerProvider {
...
public MarshallerProvider(ThreadLocalStorage typeContainer) {
this.threadLocalStorage = ...
}
@Override
public BaseMarshaller<?> getMarshaller(Class<?> javaClass) {
return new EntityMarshaller(threadLocalStorage.getType());
}
{code}
This solution needs careful testing as it's not guaranteed that the SerCtx is used to marshall and unmarshall from the same thread (this happens in the Hot Rod client)
> DynamicEntity support in MarshallerProvider
> -------------------------------------------
>
> Key: IPROTO-56
> URL: https://issues.jboss.org/browse/IPROTO-56
> Project: Infinispan ProtoStream
> Issue Type: Bug
> Reporter: Gustavo Fernandes
>
> The use case is a class that describe the entity. This class contains a 'type' and a list of properties. MarshallerProvider is used to associate a type with a marshaller that uses this 'type' to understand the fields and data types to read/write the stream.
> The type of the entity is contained in the entity itself, and when reading from the stream, this type is used to figure out the fields to read. During writes, though, the type is not involved so it's not possible to use the same strategy.
> Attached is a unit test to illustrate the situation. This is not necessarily a bug, it may be possible to achieve the usage of Dynamic Entities under other circumstances, or maybe the API needs to be extended.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (ISPN-9268) WriteBehindFaultToleranceTest.testBlockingOnStoreAvailabilityChange Failure
by Ryan Emerson (JIRA)
[ https://issues.jboss.org/browse/ISPN-9268?page=com.atlassian.jira.plugin.... ]
Ryan Emerson resolved ISPN-9268.
--------------------------------
Resolution: Done
> WriteBehindFaultToleranceTest.testBlockingOnStoreAvailabilityChange Failure
> ---------------------------------------------------------------------------
>
> Key: ISPN-9268
> URL: https://issues.jboss.org/browse/ISPN-9268
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Core
> Affects Versions: 9.3.0.CR1
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Fix For: 9.3.0.Final
>
>
> {code:java}
> java.lang.AssertionError:
> at org.infinispan.persistence.WriteBehindFaultToleranceTest.testBlockingOnStoreAvailabilityChange(WriteBehindFaultToleranceTest.java:84)
> at org.infinispan.commons.test.TestNGLongTestsHook.run(TestNGLongTestsHook.java:24)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> ... Removed 21 stack frames
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months