[JBoss JIRA] (ISPN-9846) Ensure Backwards Compatibility with Persistence SPI changes
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9846?page=com.atlassian.jira.plugin.... ]
Ryan Emerson updated ISPN-9846:
-------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/6542
> Ensure Backwards Compatibility with Persistence SPI changes
> -----------------------------------------------------------
>
> Key: ISPN-9846
> URL: https://issues.jboss.org/browse/ISPN-9846
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 10.0.0.Alpha2
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Priority: Major
> Fix For: 10.0.0.Beta1
>
>
> ISPN-9693 deprecated the {{org.infinispan.marshall.core.MarshalledEntry}} interface in favour of {{org.infinispan.persistence.spi.MarshalledEntry}}, however this breaks compatibility with 9.4.x stores as the method signatures of the various store/loader interfaces changed.
> Therefore, to aid with enabling backwards compatibility it is necessary to change {{spi.MarshalledEntry}} to {{spi.MarshallableEntry}} as well as the corresponding factory. This is necessary as the InitializationContext previously exposed {{marshall.core.MarshalledEntry}} and the naming change provides us an easy way to differentiate the context methods as we can't have two getMarshalledEntryFactory methods due to type erasure.
> Due to type erasure it is also necessary to introduce several new methods to the writer/loader methods. Deprecated/Replacement method list below:
> * CacheLoader MarshalledEntry load(Object) -> MarshallableEntry loadEntry(Object)
> * AdvancedCacheLoader Publisher<MarshalledEntry<K, V>> publishEntries(..) -> Publisher<MarshallableEntry<K, V>> entryPublisher(...)
> * CacheWriter writeBatch(Iterable<MarshalledEntry>) -> writeBulk(Publisher)- InitializationContextgetMarshalledEntryFactory->getMarshallableEntryFactory`
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9846) Ensure Backwards Compatibility with Persistence SPI changes
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9846?page=com.atlassian.jira.plugin.... ]
Ryan Emerson updated ISPN-9846:
-------------------------------
Parent: ISPN-9620
Issue Type: Sub-task (was: Bug)
> Ensure Backwards Compatibility with Persistence SPI changes
> -----------------------------------------------------------
>
> Key: ISPN-9846
> URL: https://issues.jboss.org/browse/ISPN-9846
> Project: Infinispan
> Issue Type: Sub-task
> Components: Loaders and Stores
> Affects Versions: 10.0.0.Alpha2
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Priority: Major
> Fix For: 10.0.0.Beta1
>
>
> ISPN-9693 deprecated the {{org.infinispan.marshall.core.MarshalledEntry}} interface in favour of {{org.infinispan.persistence.spi.MarshalledEntry}}, however this breaks compatibility with 9.4.x stores as the method signatures of the various store/loader interfaces changed.
> Therefore, to aid with enabling backwards compatibility it is necessary to change {{spi.MarshalledEntry}} to {{spi.MarshallableEntry}} as well as the corresponding factory. This is necessary as the InitializationContext previously exposed {{marshall.core.MarshalledEntry}} and the naming change provides us an easy way to differentiate the context methods as we can't have two getMarshalledEntryFactory methods due to type erasure.
> Due to type erasure it is also necessary to introduce several new methods to the writer/loader methods. Deprecated/Replacement method list below:
> * CacheLoader MarshalledEntry load(Object) -> MarshallableEntry loadEntry(Object)
> * AdvancedCacheLoader Publisher<MarshalledEntry<K, V>> publishEntries(..) -> Publisher<MarshallableEntry<K, V>> entryPublisher(...)
> * CacheWriter writeBatch(Iterable<MarshalledEntry>) -> writeBulk(Publisher)- InitializationContextgetMarshalledEntryFactory->getMarshallableEntryFactory`
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9846) Ensure Backwards Compatibility with Persistence SPI changes
by Ryan Emerson (Jira)
Ryan Emerson created ISPN-9846:
----------------------------------
Summary: Ensure Backwards Compatibility with Persistence SPI changes
Key: ISPN-9846
URL: https://issues.jboss.org/browse/ISPN-9846
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 10.0.0.Alpha2
Reporter: Ryan Emerson
Assignee: Ryan Emerson
Fix For: 10.0.0.Beta1
ISPN-9693 deprecated the {{org.infinispan.marshall.core.MarshalledEntry}} interface in favour of {{org.infinispan.persistence.spi.MarshalledEntry}}, however this breaks compatibility with 9.4.x stores as the method signatures of the various store/loader interfaces changed.
Therefore, to aid with enabling backwards compatibility it is necessary to change {{spi.MarshalledEntry}} to {{spi.MarshallableEntry}} as well as the corresponding factory. This is necessary as the InitializationContext previously exposed {{marshall.core.MarshalledEntry}} and the naming change provides us an easy way to differentiate the context methods as we can't have two getMarshalledEntryFactory methods due to type erasure.
Due to type erasure it is also necessary to introduce several new methods to the writer/loader methods. Deprecated/Replacement method list below:
* CacheLoader MarshalledEntry load(Object) -> MarshallableEntry loadEntry(Object)
* AdvancedCacheLoader Publisher<MarshalledEntry<K, V>> publishEntries(..) -> Publisher<MarshallableEntry<K, V>> entryPublisher(...)
* CacheWriter writeBatch(Iterable<MarshalledEntry>) -> writeBulk(Publisher)- InitializationContextgetMarshalledEntryFactory->getMarshallableEntryFactory`
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9845) Stop exposing InternalMetadata via the persistence SPI
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9845?page=com.atlassian.jira.plugin.... ]
Ryan Emerson updated ISPN-9845:
-------------------------------
Parent: ISPN-9620
Issue Type: Sub-task (was: Enhancement)
> Stop exposing InternalMetadata via the persistence SPI
> ------------------------------------------------------
>
> Key: ISPN-9845
> URL: https://issues.jboss.org/browse/ISPN-9845
> Project: Infinispan
> Issue Type: Sub-task
> Components: Loaders and Stores
> Affects Versions: 10.0.0.Alpha2
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Priority: Major
> Fix For: 10.0.0.Beta1
>
>
> We should stop exposing InternalMetadata via the persistence SPI and add created() methods direct to the MarshallableEntry interface introduced in ISPN-9693. This requires MarshallableEntry to change to:
> {code:java}
> interface MarshallableEntry<K, V> {
> ByteBuffer getKeyBytes();
> ByteBuffer getValueBytes();
> K getKey();
> V getValue();
> Metadata metadata();
> ByteBuffer metadataBytes();
> long created();
> long lastUsed();
> boolean isExpired(long now);
> long expiryTime();
> }
> {code}
> With MarshalledEntry then providing the old method for backwards compatiblity:
> {code:java}
> ByteBuffer getMetadataBytes();
> InternalMetadata getMetadata();
> {code
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9845) Stop exposing InternalMetadata via the persistence SPI
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9845?page=com.atlassian.jira.plugin.... ]
Ryan Emerson updated ISPN-9845:
-------------------------------
Description:
We should stop exposing InternalMetadata via the persistence SPI and add created() methods direct to the MarshallableEntry interface introduced in ISPN-9693. This requires MarshallableEntry to change to:
{code:java}
interface MarshallableEntry<K, V> {
ByteBuffer getKeyBytes();
ByteBuffer getValueBytes();
K getKey();
V getValue();
Metadata metadata();
ByteBuffer metadataBytes();
long created();
long lastUsed();
boolean isExpired(long now);
long expiryTime();
}
{code}
With MarshalledEntry then providing the old method for backwards compatiblity:
{code:java}
ByteBuffer getMetadataBytes();
InternalMetadata getMetadata();
{code}
was:
We should stop exposing InternalMetadata via the persistence SPI and add created() methods direct to the MarshallableEntry interface introduced in ISPN-9693. This requires MarshallableEntry to change to:
{code:java}
interface MarshallableEntry<K, V> {
ByteBuffer getKeyBytes();
ByteBuffer getValueBytes();
K getKey();
V getValue();
Metadata metadata();
ByteBuffer metadataBytes();
long created();
long lastUsed();
boolean isExpired(long now);
long expiryTime();
}
{code}
With MarshalledEntry then providing the old method for backwards compatiblity:
{code:java}
ByteBuffer getMetadataBytes();
InternalMetadata getMetadata();
{code
> Stop exposing InternalMetadata via the persistence SPI
> ------------------------------------------------------
>
> Key: ISPN-9845
> URL: https://issues.jboss.org/browse/ISPN-9845
> Project: Infinispan
> Issue Type: Sub-task
> Components: Loaders and Stores
> Affects Versions: 10.0.0.Alpha2
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Priority: Major
> Fix For: 10.0.0.Beta1
>
>
> We should stop exposing InternalMetadata via the persistence SPI and add created() methods direct to the MarshallableEntry interface introduced in ISPN-9693. This requires MarshallableEntry to change to:
> {code:java}
> interface MarshallableEntry<K, V> {
> ByteBuffer getKeyBytes();
> ByteBuffer getValueBytes();
> K getKey();
> V getValue();
> Metadata metadata();
> ByteBuffer metadataBytes();
> long created();
> long lastUsed();
> boolean isExpired(long now);
> long expiryTime();
> }
> {code}
> With MarshalledEntry then providing the old method for backwards compatiblity:
> {code:java}
> ByteBuffer getMetadataBytes();
> InternalMetadata getMetadata();
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9845) Stop exposing InternalMetadata via the persistence SPI
by Ryan Emerson (Jira)
Ryan Emerson created ISPN-9845:
----------------------------------
Summary: Stop exposing InternalMetadata via the persistence SPI
Key: ISPN-9845
URL: https://issues.jboss.org/browse/ISPN-9845
Project: Infinispan
Issue Type: Enhancement
Components: Loaders and Stores
Affects Versions: 10.0.0.Alpha2
Reporter: Ryan Emerson
Assignee: Ryan Emerson
Fix For: 10.0.0.Beta1
We should stop exposing InternalMetadata via the persistence SPI and add created() methods direct to the MarshallableEntry interface introduced in ISPN-9693. This requires MarshallableEntry to change to:
{code:java}
interface MarshallableEntry<K, V> {
ByteBuffer getKeyBytes();
ByteBuffer getValueBytes();
K getKey();
V getValue();
Metadata metadata();
ByteBuffer metadataBytes();
long created();
long lastUsed();
boolean isExpired(long now);
long expiryTime();
}
{code}
With MarshalledEntry then providing the old method for backwards compatiblity:
{code:java}
ByteBuffer getMetadataBytes();
InternalMetadata getMetadata();
{code
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9693) Make MarshalledEntryImpl private and utilise MarshalledEntryFactory instead
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9693?page=com.atlassian.jira.plugin.... ]
Ryan Emerson resolved ISPN-9693.
--------------------------------
Resolution: Done
> Make MarshalledEntryImpl private and utilise MarshalledEntryFactory instead
> ---------------------------------------------------------------------------
>
> Key: ISPN-9693
> URL: https://issues.jboss.org/browse/ISPN-9693
> Project: Infinispan
> Issue Type: Sub-task
> Components: Core, Loaders and Stores
> Affects Versions: 9.4.1.Final
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Priority: Major
> Fix For: 10.0.0.Beta1
>
>
> Currently MarshalledEntryImpl is used throughout both our production and test code. Instead, we should utilise a MarshalledEntryFactory to create all MarshalledEntry instances in production and where appropriate in test classes. Furthermore, we should prevent MarshalledEntryImpl instances being created directly by users.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9693) Make MarshalledEntryImpl private and utilise MarshalledEntryFactory instead
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9693?page=com.atlassian.jira.plugin.... ]
Ryan Emerson reopened ISPN-9693:
--------------------------------
> Make MarshalledEntryImpl private and utilise MarshalledEntryFactory instead
> ---------------------------------------------------------------------------
>
> Key: ISPN-9693
> URL: https://issues.jboss.org/browse/ISPN-9693
> Project: Infinispan
> Issue Type: Sub-task
> Components: Core, Loaders and Stores
> Affects Versions: 9.4.1.Final
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Priority: Major
> Fix For: 10.0.0.Beta1
>
>
> Currently MarshalledEntryImpl is used throughout both our production and test code. Instead, we should utilise a MarshalledEntryFactory to create all MarshalledEntry instances in production and where appropriate in test classes. Furthermore, we should prevent MarshalledEntryImpl instances being created directly by users.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9822) BasicComponentRegistryImpl fails with security manager
by Dan Berindei (Jira)
[ https://issues.jboss.org/browse/ISPN-9822?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-9822:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 10.0.0.Beta1
Resolution: Done
> BasicComponentRegistryImpl fails with security manager
> ------------------------------------------------------
>
> Key: ISPN-9822
> URL: https://issues.jboss.org/browse/ISPN-9822
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.4.0.Final, 9.4.4.Final
> Reporter: Radoslav Husar
> Assignee: Radoslav Husar
> Priority: Major
> Fix For: 10.0.0.Beta1, 9.4.6.Final
>
>
> Regression introduced by ISPN-9127.
> {code}
> [0m[0m10:22:23,189 INFO [org.jboss.as.test.clustering.TopologyChangeListenerBean] (default task-1) Cache web/ConcurrentFineWebFailoverTestCase.war successfully established view [node-1, node-2, node-3] within 0 ms. Topology id = 9
> [0m[31m10:22:26,258 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /ConcurrentFineWebFailoverTestCase/simple: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "accessDeclaredMembers")" in code source "(vfs:/content/ConcurrentFineWebFailoverTestCase.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.ConcurrentFineWebFailoverTestCase.war" from Service Module Loader")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:294)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:191)
> at java.lang.Class.checkMemberAccess(Class.java:2348)
> at java.lang.Class.getDeclaredMethod(Class.java:2127)
> at org.infinispan.commons.util.ReflectionUtil.findMethod(ReflectionUtil.java:102)
> at org.infinispan.factories.components.ComponentMetadataRepo.initInjectionMethods(ComponentMetadataRepo.java:219)
> at org.infinispan.factories.components.ComponentMetadataRepo.initMetadata(ComponentMetadataRepo.java:129)
> at org.infinispan.factories.components.ComponentMetadataRepo.getComponentMetadata(ComponentMetadataRepo.java:119)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.wireDependencies(BasicComponentRegistryImpl.java:189)
> at org.infinispan.factories.AbstractComponentRegistry.wireDependencies(AbstractComponentRegistry.java:102)
> at org.infinispan.commands.write.ComputeCommand.<init>(ComputeCommand.java:51)
> at org.infinispan.commands.CommandsFactoryImpl.buildComputeCommand(CommandsFactoryImpl.java:283)
> at org.infinispan.cache.impl.CacheImpl.computeInternal(CacheImpl.java:337)
> at org.infinispan.cache.impl.DecoratedCache.compute(DecoratedCache.java:710)
> at org.infinispan.cache.impl.DecoratedCache.compute(DecoratedCache.java:630)
> at org.infinispan.cache.impl.AbstractDelegatingCache.compute(AbstractDelegatingCache.java:393)
> at org.infinispan.cache.impl.EncoderCache.compute(EncoderCache.java:642)
> at org.infinispan.cache.impl.AbstractDelegatingCache.compute(AbstractDelegatingCache.java:393)
> at org.wildfly.clustering.web.infinispan.session.fine.FineSessionAttributes.setAttribute(FineSessionAttributes.java:94)
> at org.wildfly.clustering.web.undertow.session.DistributableSession.setAttribute(DistributableSession.java:173)
> at io.undertow.servlet.spec.HttpSessionImpl.setAttribute(HttpSessionImpl.java:169)
> at org.jboss.as.test.clustering.single.web.SimpleServlet.doGet(SimpleServlet.java:73)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:686)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
> at io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:55)
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
> at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$1$1.run(ServletInitialHandler.java:110)
> at java.security.AccessController.doPrivileged(Native Method)
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:107)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years