[JBoss JIRA] (WFLY-12596) Add way for Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged
by Scott Marlow (Jira)
Scott Marlow created WFLY-12596:
-----------------------------------
Summary: Add way for Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged
Key: WFLY-12596
URL: https://issues.jboss.org/browse/WFLY-12596
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate
Reporter: Scott Marlow
Assignee: Scott Marlow
Fix For: 19.0.0.Beta1
Some users have reported seeing warnings like:
{quote}
WARN [org.jboss.modules.define] (MSC service thread 1-4) Failed to define class BGP in Module "deployment.mine.ear" from Service Module Loader: java.lang.ClassFormatError: Failed to link SuperClassInDifferentEarClassLoader (Module "deployment.mine.ear" from Service Module Loader): Type EntityBean not present
{quote}
Where class SuperClassInDifferentEarClassLoader, is a super class that is contained in a different EAR classloader than the subclass.
The workaround should be passing the classloader to use in to the ASM ClassWriter class, by extending the ClassWriter class and providing an implementation of getClassLoader() method.
{code}
12:56:09,573 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:937)
12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1200)
12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.Frame.merge(Frame.java:1299)
12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.Frame.merge(Frame.java:1197)
12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1607)
12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1543)
12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodVisitor.visitMaxs(MethodVisitor.java:762)
12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2431)
12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1283)
12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.accept(ClassReader.java:688)
12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)
12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.hibernate.Hibernate51CompatibilityTransformer.transform(Hibernate51CompatibilityTransformer.java:102)
12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.server.deployment.module.DelegatingClassFileTransformer.transform(DelegatingClassFileTransformer.java:60)
12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.JLIClassTransformer.transform(JLIClassTransformer.java:55)
12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:539)
12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName0(Native Method)
12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName(Class.java:348)
12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at java.lang.Thread.run(Thread.java:748)
12:56:09,584 ERROR [stderr] (MSC service thread 1-4) Caused by: java.lang.ClassNotFoundException: SuperClassInDifferentEarClassLoader from [Module "asm.asm" version 7.1 from local module loader @636be97c (finder: local module finder @50a638b5 (roots: /home/smarlow/work/wildfly/dist/target/wildfly-18.0.0.Final-SNAPSHOT/modules,/home/smarlow/work/wildfly/dist/target/wildfly-18.0.0.Final-SNAPSHOT/modules/system/layers/base))]
12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName0(Native Method)
12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName(Class.java:348)
12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:935)
12:56:09,585 ERROR [stderr] (MSC service thread 1-4) ... 72 more
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFWIP-187) Changes to PVC are not reflected in Operator
by Martin Choma (Jira)
[ https://issues.jboss.org/browse/WFWIP-187?page=com.atlassian.jira.plugin.... ]
Martin Choma edited comment on WFWIP-187 at 9/26/19 1:20 PM:
-------------------------------------------------------------
[~jmesnil] was it necessary to introduce new annotation on StatefulSet. There is currently Kubernetes standard {{metadata.generation}}. I just want to make sure you have considered this option as well.
EDITED: or the reason was recreation of StatefulSet is needed? Is recreating StatefulSet safe operation?
Anyway, it is not how I would expect to behave. I see my changes in SS {{2Mi}}, but it is not propagated into pvc object, where there is always {{1Mi}}
{code}
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: operator-updated-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Mi
status:
phase: Pending
{code}
PVC:
{code}
Status:
Bound to volume vol41
Capacity:
allocated 1 GiB
Requested Capacity:
1 MiB
Access Modes:
RWO (Read-Write-Once)
{code}
EDITED:
- adding in runtime works as expected. PVC is not there and is created.
- removing in runtime does not work as I would expect. PVC is still there
EDITED:
- I am trying on https://github.com/wildfly/wildfly-operator/tree/64183f20d483c8aa072d294f... because newer images we have are broken https://issues.jboss.org/browse/WFWIP-209
was (Author: mchoma):
[~jmesnil] was it necessary to introduce new annotation on StatefulSet. There is currently Kubernetes standard {{metadata.generation}}. I just want to make sure you have considered this option as well.
EDITED: or the reason was recreation of StatefulSet is needed? Is recreating StatefulSet safe operation?
Anyway, it is not how I would expect to behave. I see my changes in SS {{2Mi}}, but it is not propagated into pvc object, where there is always {{1Mi}}
{code}
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: operator-updated-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Mi
status:
phase: Pending
{code}
PVC:
{code}
Status:
Bound to volume vol41
Capacity:
allocated 1 GiB
Requested Capacity:
1 MiB
Access Modes:
RWO (Read-Write-Once)
{code}
EDITED:
- adding in runtime works as expected. PVC is not there and is created.
- removing in runtime does not work as I would expect. PVC is still there
> Changes to PVC are not reflected in Operator
> --------------------------------------------
>
> Key: WFWIP-187
> URL: https://issues.jboss.org/browse/WFWIP-187
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Martin Choma
> Assignee: Jeff Mesnil
> Priority: Blocker
> Labels: operator
>
> Any chnages (adding, removing or updating) made to PVC after WildFlyServer CR was created are not reflected in underlying PVC kubernetes object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: (was: EJB DistributableCache (passivating).png)
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (local, passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: (was: EJB SimpleCache.png)
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (local, passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: (was: Schedulers for distributed workloads.png)
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (local, passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: (was: Schedulers for local workloads.png)
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (local, passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: EJB DistributableCache (local, passivating).png
EJB SimpleCache.png
Schedulers for distributed workloads.png
Schedulers for local workloads.png
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (local, passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro edited comment on WFLY-12581 at 9/26/19 1:04 PM:
--------------------------------------------------------------
Attached some perf comparisons of new scheduler implementations vs current implementations for both distributed and local workloads. The charts plot the elapsed time for N concurrent clients to perform a large number of insert/remove operations.
was (Author: pferraro):
Attached some perf comparisons of new scheduler implementations vs current implementations for both distributed and local workloads. The charts plot the elapsed time for N concurrent clients to perform a large number of insert/disable operations, followed by a remove operation.
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro edited comment on WFLY-12581 at 9/26/19 1:03 PM:
--------------------------------------------------------------
Attached some perf comparisons of new scheduler implementations vs current implementations for both distributed and local workloads. The charts plot the elapsed time for N concurrent clients to perform a large number of insert/disable operations, followed by a remove operation.
was (Author: pferraro):
Attached some perf comparisons of new scheduler implementations vs current implementations for both distributed and local workloads. The charts plot the elapsed time for N concurrent clients to perform a large number of insert/disable/remove operations.
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro edited comment on WFLY-12581 at 9/26/19 1:01 PM:
--------------------------------------------------------------
[~flavia.rainone] Applying the new expiration scheduler to the EJB simple cache effectively doubles the performance of @Stateful EJB invocations under load. See attached chart.
was (Author: pferraro):
Applying this new expiration scheduler to the EJB simple cache effectively doubles the performance of @Stateful EJB invocations under load. See attached chart.
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years