[JBoss JIRA] (ISPN-7122) JpaStore Performance is Poor
by Tuomas Kiviaho (JIRA)
[ https://issues.jboss.org/browse/ISPN-7122?page=com.atlassian.jira.plugin.... ]
Tuomas Kiviaho commented on ISPN-7122:
--------------------------------------
The bad thing is that the slowness can creep in gradually long after the decision to utilize this cache-store has been made.
It seems to me based on what is documented into the codebase that in the feat of JPA eager fetch causing OOME, the fetching of only id's is being applied.
Hibernate nowadays admits in it's fetching strategies that eager fetch should be disabled by default and (named) entity graphs/queries should be used instead in contradiction what default fetch types of @ManyToOne and @OneToOne are. The code base seems to be still using now deprecated criteria queries, but allowing different fetching strategies would leave the responsibility of avoiding possible OOME to the configurator. When no named entity graphs/queries have been provided then the default behavior could be what it is currently.
[~sannegrinovero] What would happen if the https://issues.jboss.org/browse/ISPN-4538 would be solved by just applying detach right after the entity has been consumed. Would it impact also the possible second level cache.
> JpaStore Performance is Poor
> ----------------------------
>
> Key: ISPN-7122
> URL: https://issues.jboss.org/browse/ISPN-7122
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 8.2.4.Final
> Reporter: Dan Siviter
> Assignee: Ryan Emerson
>
> When using the {{JpaStore}} it load's IDs, then iterates around the result and manually getting the record. This means for large datasets the performance is really poor. There is a comment in the code regarding this, but in it's current state it effectively makes it unusable.
> As an example with a dataset of 12,600 records using a a generic but customised JPA:
> * Bulk load: 977ms,
> * {{JpaStore}}: 137,906ms
>
> Increase: 14,015%
> Obviously paralleling the call or another DB might be quicker, but not much!
> Would it possible to have some level of chunking/batching of the load? IMO this would be a suitable compromise.
> I'm afraid I can't share the code for my loader, but it is loading a simple entity with no referenced objects, no so no joins.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (ISPN-8350) Some scripts fail to execute on off-heap cache
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-8350?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-8350:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 9.2.0.Alpha1
Resolution: Done
> Some scripts fail to execute on off-heap cache
> ----------------------------------------------
>
> Key: ISPN-8350
> URL: https://issues.jboss.org/browse/ISPN-8350
> Project: Infinispan
> Issue Type: Bug
> Components: Server, Tasks
> Affects Versions: 9.1.0.Final
> Reporter: Vojtech Juranek
> Assignee: Gustavo Fernandes
> Fix For: 9.2.0.Alpha1
>
>
> While executing simple scripts on server with off-heap cache seems to work fine, some scripts like script with map and reduce functions fails with
> {noformat}
> 12:33:00,695 DEBUG [org.infinispan.server.hotrod.HotRodExceptionHandler] (HotRod-ServerWorker-5-3) Exception caught: org.infinispan.commons.CacheException: java.io.IOException: Unsupported protocol version 1
> at org.infinispan.commons.dataconversion.MarshallerEncoder.fromStorage(MarshallerEncoder.java:36)
> at org.infinispan.cache.impl.EncoderEntryMapper.decode(EncoderEntryMapper.java:56)
> at org.infinispan.cache.impl.EncoderEntryMapper.apply(EncoderEntryMapper.java:66)
> at org.infinispan.cache.impl.EncoderEntryMapper.apply(EncoderEntryMapper.java:23)
> at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
> at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812)
> at org.infinispan.commons.util.Closeables$SpliteratorAsCloseableSpliterator.tryAdvance(Closeables.java:143)
> at java.util.Spliterator.forEachRemaining(Spliterator.java:326)
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
> at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
> at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
> at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
> at org.infinispan.stream.impl.local.LocalCacheStream.collect(LocalCacheStream.java:360)
> at jdk.nashorn.internal.scripts.Script$1$\^eval\_.:program(<eval>:11)
> at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
> at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
> at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
> at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:418)
> at jdk.nashorn.api.scripting.NashornScriptEngine.access$300(NashornScriptEngine.java:73)
> at jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(NashornScriptEngine.java:511)
> at javax.script.CompiledScript.eval(CompiledScript.java:92)
> at org.infinispan.scripting.impl.ScriptingManagerImpl.execute(ScriptingManagerImpl.java:239)
> at org.infinispan.scripting.impl.LocalRunner.runScript(LocalRunner.java:19)
> at org.infinispan.scripting.impl.ScriptingManagerImpl.runScript(ScriptingManagerImpl.java:222)
> at org.infinispan.scripting.impl.ScriptingTaskEngine.runTask(ScriptingTaskEngine.java:44)
> at org.infinispan.tasks.impl.TaskManagerImpl.runTask(TaskManagerImpl.java:99)
> at org.infinispan.server.hotrod.ContextHandler.realRead(ContextHandler.java:120)
> at org.infinispan.server.hotrod.ContextHandler.lambda$channelRead0$0(ContextHandler.java:52)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.io.IOException: Unsupported protocol version 1
> at org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1348)
> at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.startObjectInput(AbstractJBossMarshaller.java:128)
> at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromByteBuffer(AbstractJBossMarshaller.java:109)
> at org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
> at org.infinispan.commons.dataconversion.MarshallerEncoder.fromStorage(MarshallerEncoder.java:34)
> ... 32 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (ISPN-8356) Embedded distribution names are confusing
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-8356?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-8356:
----------------------------------
Status: Open (was: New)
> Embedded distribution names are confusing
> -----------------------------------------
>
> Key: ISPN-8356
> URL: https://issues.jboss.org/browse/ISPN-8356
> Project: Infinispan
> Issue Type: Enhancement
> Components: Build process
> Affects Versions: 9.1.1.Final
> Reporter: Tristan Tarrant
> Assignee: Tristan Tarrant
> Fix For: 9.2.0.Final
>
>
> The binary distribution names for embedded libraries are confusing:
> I propose the following names
>
> - infinispan-${version}-all.zip -> infinispan-embedded-${version}-all.zip
> - infinispan-${version}-minimal.zip -> infinispan-embedded-${version}-minimal.zip
> - infinispan-${version}-remote.zip -> infinispan-remote-${version}.zip
> The website labelling needs to be modified accordingly too
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (ISPN-8356) Embedded distribution names are confusing
by Tristan Tarrant (JIRA)
Tristan Tarrant created ISPN-8356:
-------------------------------------
Summary: Embedded distribution names are confusing
Key: ISPN-8356
URL: https://issues.jboss.org/browse/ISPN-8356
Project: Infinispan
Issue Type: Enhancement
Components: Build process
Affects Versions: 9.1.1.Final
Reporter: Tristan Tarrant
Assignee: Tristan Tarrant
Fix For: 9.2.0.Final
The binary distribution names for embedded libraries are confusing:
I propose the following names
- infinispan-${version}-all.zip -> infinispan-embedded-${version}-all.zip
- infinispan-${version}-minimal.zip -> infinispan-embedded-${version}-minimal.zip
- infinispan-${version}-remote.zip -> infinispan-remote-${version}.zip
The website labelling needs to be modified accordingly too
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (ISPN-8355) Calling withEncoding on a DecoratedCache loses state
by William Burns (JIRA)
William Burns created ISPN-8355:
-----------------------------------
Summary: Calling withEncoding on a DecoratedCache loses state
Key: ISPN-8355
URL: https://issues.jboss.org/browse/ISPN-8355
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 9.1.1.Final
Reporter: William Burns
If you have a DecoratedCache say by invoking `cache.getAdvancedCache.withFlags(Flag.CACHE_MODE_LOCAL)` if you invoke `withEncoder` on that it will lose the Flag, Subject or lock owner. We need to make sure these are kept.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months