[JBoss JIRA] (ISPN-9508) NullPointerException from putAll on a cache with a store during rehash
by William Burns (Jira)
[ https://issues.jboss.org/browse/ISPN-9508?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-9508:
--------------------------------
Status: Open (was: New)
> NullPointerException from putAll on a cache with a store during rehash
> ----------------------------------------------------------------------
>
> Key: ISPN-9508
> URL: https://issues.jboss.org/browse/ISPN-9508
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.3.1.Final
> Reporter: Sergey Chernolyas
> Priority: Major
> Fix For: 9.4.0.Final
>
> Attachments: hang_infinispan931.out, hs_err_pid17420.log, npe_server2_start.log, server1.log, server2.log, server2.log.2018-09-11
>
>
> Cache can't start.
> See exception:
> {noformat}
> [org.infinispan.remoting.inboundhandler.NonTotalOrderPerCacheInboundInvocationHandler] (jgroups-30,dr-opsdb01) ISPN000071: Caught exception when handling command SingleRpcCommand{cacheName='SEGMENTS', command=PutMapCommand
> ....
> flags=[IGNORE_RETURN_VALUES], metadata=EmbeddedExpirableMetadata{lifespan=-1, maxIdle=-1, version=NumericVersion{version=844429225112
> 147}}, isForwarded=true}}: org.infinispan.persistence.spi.PersistenceException: java.lang.NullPointerException
> at org.infinispan.persistence.rocksdb.RocksDBStore.writeBatch(RocksDBStore.java:412)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.lambda$writeBatchToAllNonTxStores$17(PersistenceManagerImpl.java:604)
> at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
> at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
> at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
> at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
> at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
> at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
> at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
> at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.writeBatchToAllNonTxStores(PersistenceManagerImpl.java:604)
> at org.infinispan.interceptors.impl.CacheWriterInterceptor.processIterableBatch(CacheWriterInterceptor.java:265)
> at org.infinispan.interceptors.impl.DistCacheWriterInterceptor.handlePutMapCommandReturn(DistCacheWriterInterceptor.java:93)
> at org.infinispan.interceptors.InvocationSuccessAction.apply(InvocationSuccessAction.java:22)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.invokeQueuedHandlers(QueueAsyncInvocationStage.java:118)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:81)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:30)
> at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
> at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
> at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
> at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
> at org.infinispan.remoting.transport.AbstractRequest.complete(AbstractRequest.java:67)
> at org.infinispan.remoting.transport.impl.MultiTargetRequest.onResponse(MultiTargetRequest.java:102)
> at org.infinispan.remoting.transport.jgroups.StaggeredRequest.onResponse(StaggeredRequest.java:50)
> at org.infinispan.remoting.transport.impl.RequestRepository.addResponse(RequestRepository.java:52)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1370)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1273)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$300(JGroupsTransport.java:125)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.up(JGroupsTransport.java:1418)
> at org.jgroups.JChannel.up(JChannel.java:816)
> at org.jgroups.fork.ForkProtocolStack.up(ForkProtocolStack.java:134)
> at org.jgroups.stack.Protocol.up(Protocol.java:340)
> at org.jgroups.protocols.FORK.up(FORK.java:134)
> at org.jgroups.protocols.FRAG3.up(FRAG3.java:171)
> at org.jgroups.protocols.FlowControl.up(FlowControl.java:343)
> at org.jgroups.protocols.pbcast.GMS.up(GMS.java:865)
> at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:240)
> at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1003)
> at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:729)
> at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:384)
> at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:600)
> at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:119)
> at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:199)
> at org.jgroups.protocols.FD.up(FD.java:212)
> at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:252)
> at org.jgroups.protocols.Discovery.up(Discovery.java:267)
> at org.jgroups.protocols.TP.passMessageUp(TP.java:1248)
> at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:87)
> 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)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (ISPN-9451) When fail-silently is false, the system will behave based on persistence configuration
by Diego Lovison (Jira)
[ https://issues.jboss.org/browse/ISPN-9451?page=com.atlassian.jira.plugin.... ]
Diego Lovison commented on ISPN-9451:
-------------------------------------
??As the second app is an independent process, it should attempt to establish a connection `connection-attempts` times??
IMO, when fail-silently is true. This is why I created the issue.
> When fail-silently is false, the system will behave based on persistence configuration
> --------------------------------------------------------------------------------------
>
> Key: ISPN-9451
> URL: https://issues.jboss.org/browse/ISPN-9451
> Project: Infinispan
> Issue Type: Bug
> Reporter: Diego Lovison
> Assignee: Ryan Emerson
> Priority: Critical
>
> Using the configuration below when the store is not available, the system won't fail at the first time.
> {code:xml}
> <?xml version="1.0" ?>
> <infinispan>
> <jgroups>
> <stack-file name="external-file" path="default-jgroups-tcp.xml"/>
> </jgroups>
> <cache-container name="myCacheContainer" default-cache="myCache" statistics="true">
> <transport cluster="WeatherApp" stack="external-file" />
> <distributed-cache owners="2" mode="SYNC" remote-timeout="15000" name="myCache">
> <transaction mode="NONE"/>
> <persistence connection-attempts="5" connection-interval="2000">
> <string-keyed-jdbc-store fetch-state="false" purge="false" read-only="false" shared="true">
> <write-behind fail-silently="false" />
> <string-keyed-table prefix="ISPN_STRING_TABLE" create-on-start="true">
> <id-column name="ID_COLUMN" type="VARCHAR(255)"/>
> <data-column name="DATA_COLUMN" type="BINARY"/>
> <timestamp-column name="TIMESTAMP_COLUMN" type="BIGINT"/>
> </string-keyed-table>
> <connection-pool
> connection-url="jdbc:h2:~/test;FILE_LOCK=SOCKET"
> driver="org.h2.Driver" username="sa"/>
> </string-keyed-jdbc-store>
> </persistence>
> </distributed-cache>
> </cache-container>
> </infinispan>
> {code}
> To reproduce the issue, you should start the application twice.
> The first application will work fine. The second one will fail 5 times before stops working.
> The fail-silently is "false" so it should fail at the first time.
> {code:java}
> public class ConfigurationFileCacheExample {
> public static void main(String[] args) throws InterruptedException, IOException {
> EmbeddedCacheManager cacheManager = new DefaultCacheManager("cache-jdbc-store.xml");
> try {
> Cache<String, LocationWeather> cache = cacheManager.getCache("weather");
> System.out.println(cache.size());
> while (true) {
> String location = UUID.randomUUID().toString();
> cache.put(location, new LocationWeather(37, location));
> TimeUnit.SECONDS.sleep(1);
> }
> } finally {
> cacheManager.stop();
> }
> }
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (ISPN-9451) When fail-silently is false, the system will behave based on persistence configuration
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9451?page=com.atlassian.jira.plugin.... ]
Ryan Emerson commented on ISPN-9451:
------------------------------------
[~dlovison] Ok I see the same error, but I disagree that we want the second app to fail immediately. As the second app is an independent process, it should attempt to establish a connection `connection-attempts`times. Furthermore, "fail-silently" is actually not relevant in this case as the PoolInitializationException is being thrown during cache startup in `PersistenceManagerImpl.start()` when trying to initialise the connection pool, not by the `AsynchCacheWriter`.
> When fail-silently is false, the system will behave based on persistence configuration
> --------------------------------------------------------------------------------------
>
> Key: ISPN-9451
> URL: https://issues.jboss.org/browse/ISPN-9451
> Project: Infinispan
> Issue Type: Bug
> Reporter: Diego Lovison
> Assignee: Ryan Emerson
> Priority: Critical
>
> Using the configuration below when the store is not available, the system won't fail at the first time.
> {code:xml}
> <?xml version="1.0" ?>
> <infinispan>
> <jgroups>
> <stack-file name="external-file" path="default-jgroups-tcp.xml"/>
> </jgroups>
> <cache-container name="myCacheContainer" default-cache="myCache" statistics="true">
> <transport cluster="WeatherApp" stack="external-file" />
> <distributed-cache owners="2" mode="SYNC" remote-timeout="15000" name="myCache">
> <transaction mode="NONE"/>
> <persistence connection-attempts="5" connection-interval="2000">
> <string-keyed-jdbc-store fetch-state="false" purge="false" read-only="false" shared="true">
> <write-behind fail-silently="false" />
> <string-keyed-table prefix="ISPN_STRING_TABLE" create-on-start="true">
> <id-column name="ID_COLUMN" type="VARCHAR(255)"/>
> <data-column name="DATA_COLUMN" type="BINARY"/>
> <timestamp-column name="TIMESTAMP_COLUMN" type="BIGINT"/>
> </string-keyed-table>
> <connection-pool
> connection-url="jdbc:h2:~/test;FILE_LOCK=SOCKET"
> driver="org.h2.Driver" username="sa"/>
> </string-keyed-jdbc-store>
> </persistence>
> </distributed-cache>
> </cache-container>
> </infinispan>
> {code}
> To reproduce the issue, you should start the application twice.
> The first application will work fine. The second one will fail 5 times before stops working.
> The fail-silently is "false" so it should fail at the first time.
> {code:java}
> public class ConfigurationFileCacheExample {
> public static void main(String[] args) throws InterruptedException, IOException {
> EmbeddedCacheManager cacheManager = new DefaultCacheManager("cache-jdbc-store.xml");
> try {
> Cache<String, LocationWeather> cache = cacheManager.getCache("weather");
> System.out.println(cache.size());
> while (true) {
> String location = UUID.randomUUID().toString();
> cache.put(location, new LocationWeather(37, location));
> TimeUnit.SECONDS.sleep(1);
> }
> } finally {
> cacheManager.stop();
> }
> }
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (ISPN-9451) When fail-silently is false, the system will behave based on persistence configuration
by Diego Lovison (Jira)
[ https://issues.jboss.org/browse/ISPN-9451?page=com.atlassian.jira.plugin.... ]
Diego Lovison edited comment on ISPN-9451 at 10/4/18 8:22 AM:
--------------------------------------------------------------
[~ryanemerson] the database configuration is "jdbc:h2:~/test;FILE_LOCK=SOCKET" in this case, it will allow only one program to get the connection from the database. When you start the second Java App, you will see the following error in the console
{noformat}
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-197]
{noformat}
The cache configuration is fail-silently=false. I am expecting that the second Java App to fail in the first time and not try 5 times.
was (Author: dlovison):
[~ryanemerson] the database configuration is "jdbc:h2:~/test;FILE_LOCK=SOCKET" in this case, it will allow only one program to get the connection from the database. When you start the second Java App, you will see the following error in the console
{noformat}
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-197]
{noformat}
The cache configuration for fail-silently=false. I am expecting that the second Java App to fail in the first time and not try 5 times.
> When fail-silently is false, the system will behave based on persistence configuration
> --------------------------------------------------------------------------------------
>
> Key: ISPN-9451
> URL: https://issues.jboss.org/browse/ISPN-9451
> Project: Infinispan
> Issue Type: Bug
> Reporter: Diego Lovison
> Assignee: Ryan Emerson
> Priority: Critical
>
> Using the configuration below when the store is not available, the system won't fail at the first time.
> {code:xml}
> <?xml version="1.0" ?>
> <infinispan>
> <jgroups>
> <stack-file name="external-file" path="default-jgroups-tcp.xml"/>
> </jgroups>
> <cache-container name="myCacheContainer" default-cache="myCache" statistics="true">
> <transport cluster="WeatherApp" stack="external-file" />
> <distributed-cache owners="2" mode="SYNC" remote-timeout="15000" name="myCache">
> <transaction mode="NONE"/>
> <persistence connection-attempts="5" connection-interval="2000">
> <string-keyed-jdbc-store fetch-state="false" purge="false" read-only="false" shared="true">
> <write-behind fail-silently="false" />
> <string-keyed-table prefix="ISPN_STRING_TABLE" create-on-start="true">
> <id-column name="ID_COLUMN" type="VARCHAR(255)"/>
> <data-column name="DATA_COLUMN" type="BINARY"/>
> <timestamp-column name="TIMESTAMP_COLUMN" type="BIGINT"/>
> </string-keyed-table>
> <connection-pool
> connection-url="jdbc:h2:~/test;FILE_LOCK=SOCKET"
> driver="org.h2.Driver" username="sa"/>
> </string-keyed-jdbc-store>
> </persistence>
> </distributed-cache>
> </cache-container>
> </infinispan>
> {code}
> To reproduce the issue, you should start the application twice.
> The first application will work fine. The second one will fail 5 times before stops working.
> The fail-silently is "false" so it should fail at the first time.
> {code:java}
> public class ConfigurationFileCacheExample {
> public static void main(String[] args) throws InterruptedException, IOException {
> EmbeddedCacheManager cacheManager = new DefaultCacheManager("cache-jdbc-store.xml");
> try {
> Cache<String, LocationWeather> cache = cacheManager.getCache("weather");
> System.out.println(cache.size());
> while (true) {
> String location = UUID.randomUUID().toString();
> cache.put(location, new LocationWeather(37, location));
> TimeUnit.SECONDS.sleep(1);
> }
> } finally {
> cacheManager.stop();
> }
> }
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (ISPN-9451) When fail-silently is false, the system will behave based on persistence configuration
by Diego Lovison (Jira)
[ https://issues.jboss.org/browse/ISPN-9451?page=com.atlassian.jira.plugin.... ]
Diego Lovison commented on ISPN-9451:
-------------------------------------
[~ryanemerson] the database configuration is "jdbc:h2:~/test;FILE_LOCK=SOCKET" in this case, it will allow only one program to get the connection from the database. When you start the second Java App, you will see the following error in the console
{noformat}
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-197]
{noformat}
The cache configuration for fail-silently=false. I am expecting that the second Java App to fail in the first time and not try 5 times.
> When fail-silently is false, the system will behave based on persistence configuration
> --------------------------------------------------------------------------------------
>
> Key: ISPN-9451
> URL: https://issues.jboss.org/browse/ISPN-9451
> Project: Infinispan
> Issue Type: Bug
> Reporter: Diego Lovison
> Assignee: Ryan Emerson
> Priority: Critical
>
> Using the configuration below when the store is not available, the system won't fail at the first time.
> {code:xml}
> <?xml version="1.0" ?>
> <infinispan>
> <jgroups>
> <stack-file name="external-file" path="default-jgroups-tcp.xml"/>
> </jgroups>
> <cache-container name="myCacheContainer" default-cache="myCache" statistics="true">
> <transport cluster="WeatherApp" stack="external-file" />
> <distributed-cache owners="2" mode="SYNC" remote-timeout="15000" name="myCache">
> <transaction mode="NONE"/>
> <persistence connection-attempts="5" connection-interval="2000">
> <string-keyed-jdbc-store fetch-state="false" purge="false" read-only="false" shared="true">
> <write-behind fail-silently="false" />
> <string-keyed-table prefix="ISPN_STRING_TABLE" create-on-start="true">
> <id-column name="ID_COLUMN" type="VARCHAR(255)"/>
> <data-column name="DATA_COLUMN" type="BINARY"/>
> <timestamp-column name="TIMESTAMP_COLUMN" type="BIGINT"/>
> </string-keyed-table>
> <connection-pool
> connection-url="jdbc:h2:~/test;FILE_LOCK=SOCKET"
> driver="org.h2.Driver" username="sa"/>
> </string-keyed-jdbc-store>
> </persistence>
> </distributed-cache>
> </cache-container>
> </infinispan>
> {code}
> To reproduce the issue, you should start the application twice.
> The first application will work fine. The second one will fail 5 times before stops working.
> The fail-silently is "false" so it should fail at the first time.
> {code:java}
> public class ConfigurationFileCacheExample {
> public static void main(String[] args) throws InterruptedException, IOException {
> EmbeddedCacheManager cacheManager = new DefaultCacheManager("cache-jdbc-store.xml");
> try {
> Cache<String, LocationWeather> cache = cacheManager.getCache("weather");
> System.out.println(cache.size());
> while (true) {
> String location = UUID.randomUUID().toString();
> cache.put(location, new LocationWeather(37, location));
> TimeUnit.SECONDS.sleep(1);
> }
> } finally {
> cacheManager.stop();
> }
> }
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (ISPN-9582) Lifespan/MaxIdle = 0 from Hot Rod behaviour is inconsistent with embedded
by Tristan Tarrant (Jira)
Tristan Tarrant created ISPN-9582:
-------------------------------------
Summary: Lifespan/MaxIdle = 0 from Hot Rod behaviour is inconsistent with embedded
Key: ISPN-9582
URL: https://issues.jboss.org/browse/ISPN-9582
Project: Infinispan
Issue Type: Bug
Affects Versions: 9.4.0.CR3
Reporter: Tristan Tarrant
Assignee: Tristan Tarrant
Fix For: 9.4.0.Final
In embedded mode, specifying 0 for lifespan or maxIdle results in immediate expiration.
In Hot Rod, however, 0 results in the entry using the default server-side expiration. This was done in order to not introduce a protocol change at the time.
The 2.2 protocol introduced timeunit support with special values for default and infinity.
We should therefore not override a user-specified value of 0 with "default".
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months