[JBoss JIRA] (ISPN-8213) Functional commands are not replayed in tx on non-read owner
by Gustavo Lira (Jira)
[ https://issues.jboss.org/browse/ISPN-8213?page=com.atlassian.jira.plugin.... ]
Gustavo Lira closed ISPN-8213.
------------------------------
> Functional commands are not replayed in tx on non-read owner
> ------------------------------------------------------------
>
> Key: ISPN-8213
> URL: https://issues.jboss.org/browse/ISPN-8213
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.1.0.Final
> Reporter: Radim Vansa
> Assignee: Radim Vansa
> Priority: Major
> Fix For: 9.4.0.Final
>
>
> When a functional command is executed on a node that is rebalancing and is not a read owner, we don't fetch the value (it does not end up in context's looked-up entries) but execute the command remotely in a read-only way.
> The entry should be later written on this node, too, but EWI tries to commit only looked-up entries.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9685) Update Distributed task execution policy documentation - DistributedExecutorService is deprecated
by Diego Lovison (Jira)
Diego Lovison created ISPN-9685:
-----------------------------------
Summary: Update Distributed task execution policy documentation - DistributedExecutorService is deprecated
Key: ISPN-9685
URL: https://issues.jboss.org/browse/ISPN-9685
Project: Infinispan
Issue Type: Bug
Reporter: Diego Lovison
Since 9.1 DistributedExecutorService is deprecated
In the document section "Distributed task execution policy" ( http://infinispan.org/docs/stable/user_guide/user_guide.html#distributed_... ) the code example
{code:java}
DistributedExecutorService des = new DefaultExecutorService(cache);
DistributedTaskBuilder<Boolean> taskBuilder = des.createDistributedTaskBuilder(new SomeCallable());
taskBuilder.executionPolicy(DistributedTaskExecutionPolicy.SAME_RACK);
DistributedTask<Boolean> distributedTask = taskBuilder.build();
Future<Boolean> future = des.submit(distributedTask);
Boolean r = future.get();
{code}
uses a deprecated class DistributedExecutorService
We should update the document.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9682) NullPointerException when put to JCache
by Dan Berindei (Jira)
[ https://issues.jboss.org/browse/ISPN-9682?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-9682:
------------------------------------
Functional maps with simple caches are not tested, so we should not allow them. Alternatively we could implement functional maps without the invocation chain, but I'm not sure the functional API brings any advantage for local caches without persistence.
> NullPointerException when put to JCache
> ---------------------------------------
>
> Key: ISPN-9682
> URL: https://issues.jboss.org/browse/ISPN-9682
> Project: Infinispan
> Issue Type: Bug
> Components: JCache
> Affects Versions: 9.4.0.Final, 9.4.1.Final
> Reporter: Andrei Arkaev
> Priority: Blocker
>
> After upgrade from 9.4.0.RC3 to 9.4.0.Final (and 9.4.1.Final too) I have an error
> java.lang.NullPointerException: null
> at org.infinispan.functional.impl.AbstractFunctionalMap.invokeAsync(AbstractFunctionalMap.java:127)
> at org.infinispan.functional.impl.ReadWriteMapImpl.eval(ReadWriteMapImpl.java:70)
> at org.infinispan.jcache.embedded.JCache.put(JCache.java:409)
> Cache configuration
> <local-cache
> name="SomeGlobalCache"
> simple-cache="true"
> statistics="false"
> statistics-available="false">
> <transaction mode="NONE"/>
> </local-cache>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (HRJS-79) Registering listener with undefined listenerId does nothing
by Anna Manukyan (Jira)
[ https://issues.jboss.org/browse/HRJS-79?page=com.atlassian.jira.plugin.sy... ]
Anna Manukyan updated HRJS-79:
------------------------------
Description:
I was trying the following scenario: the case when the listenerId is passed while adding new listeners.
I was creating 3 listeners for create,modify and remove events. While adding listeners for modify and remove events I was passing the listenerId, but for modify event the listenerId was some nonexistent string.
I was curious what will happen. From the functional side nothing happened, so the modify event is not fired and from the logs I can see the following:
{code}
[2018-09-25T22:24:55.845] [DEBUG] client - Invoke addListener(msgId=464,event=create,listenerId=listener_465,opts=undefined) remotely
[2018-09-25T22:24:55.845] [TRACE] encoder - Encode operation with topology id 0
[2018-09-25T22:24:55.846] [TRACE] listener - Create listener emitter for connection 127.0.0.1:11222@conn_15 and listener with listenerId=listener_465
[2018-09-25T22:24:55.846] [TRACE] io_7 - Write buffer(msgId=464) to 127.0.0.1:11222@conn_15: A0D0031D2500000300010D00010D000C6C697374656E65725F343635000000000F
[2018-09-25T22:24:55.847] [TRACE] decoder - Read header(msgId=464): opCode=38, status=0, hasNewTopology=0
[2018-09-25T22:24:55.847] [TRACE] decoder - Call decode for request(msgId=464)
[2018-09-25T22:24:55.847] [TRACE] io_7_conn_15 - Complete success for request(msgId=464) with true
[2018-09-25T22:24:55.847] [TRACE] io_7_conn_15 - After decoding request(msgId=464), buffer size is 6, and offset 6
[2018-09-25T22:24:55.847] [DEBUG] client - Invoke addListener(msgId=466,event=modify,opts={"listenerId":"blblbl"}) locally
{color:red}[2018-09-25T22:24:55.848] [TRACE] listener - Create listener emitter for connection undefined and listener with listenerId=blblbl{color}
[2018-09-25T22:24:55.848] [DEBUG] client - Invoke addListener(msgId=467,event=remove,opts={"listenerId":"listener_465"}) locally
{code}
So the first line creates "create" event listener remotely. For the "modify" and "delete" events the "addLocalListener()" function is called. I am worried about the line marked in red, there the connection is passed as {color:red}undefined{color}.
I have found out that the connection parameter is not passed to protocol's addListener function when it is called from addLocalListener() function, but couldn't find a way to fix that.
Should it be that way?
I know that this kind of scenario is hardly possible but just in case the developer did some mistake, perhaps he/she may spend much time on finding why the event is not fired.
The code for generating this log is given here:
{code}
...code in the test...
it('fails when trying to attach to non-existent listener', function(done) {
client.then(function (client) {
var clientAddListenerCreate = client.addListener(
'create', function(key) { console.log('[Event] Created key: ' + key); });
var clientAddListeners = clientAddListenerCreate.then(
function(listenerId) {
// Multiple callbacks can be associated with a single client-side listener.
// This is achieved by registering listeners with the same listener id
// as shown in the example below.
var clientAddListenerModify = client.addListener(
'modify', function(key) { console.log('[Event] Modified key: ' + key); },
{listenerId: 'blblbl'});
var clientAddListenerRemove = client.addListener(
'remove', function(key) { console.log('[Event] Removed key: ' + key); },
{listenerId: listenerId});
return Promise.all([clientAddListenerModify, clientAddListenerRemove]);
});
var clientCreate = clientAddListeners.then(
function() { return client.putIfAbsent('eventful', 'v0'); });
var clientModify = clientCreate.then(
function() { return client.replace('eventful', 'v1'); });
var clientRemove = clientModify.then(
function() { return client.remove('eventful'); });
var clientRemoveListener =
Promise.all([clientAddListenerCreate, clientRemove]).then(
function(values) {
var listenerId = values[0];
return client.removeListener(listenerId);
});
}).catch(t.failed(done)).finally(done);
});
........
{code}
was:
I was trying the following scenario: the case when the listenerId is passed while adding new listeners.
I was creating 3 listeners for create,modify and remove events. While adding listeners for modify and remove events I was passing the listenerId, but for modify event the listenerId was some nonexistent string.
I was curious what will happen. From the functional side nothing happened, so the modify event is not fired and from the logs I can see the following:
{code}
[2018-09-25T22:24:55.845] [DEBUG] client - Invoke addListener(msgId=464,event=create,listenerId=listener_465,opts=undefined) remotely
[2018-09-25T22:24:55.845] [TRACE] encoder - Encode operation with topology id 0
[2018-09-25T22:24:55.846] [TRACE] listener - Create listener emitter for connection 127.0.0.1:11222@conn_15 and listener with listenerId=listener_465
[2018-09-25T22:24:55.846] [TRACE] io_7 - Write buffer(msgId=464) to 127.0.0.1:11222@conn_15: A0D0031D2500000300010D00010D000C6C697374656E65725F343635000000000F
[2018-09-25T22:24:55.847] [TRACE] decoder - Read header(msgId=464): opCode=38, status=0, hasNewTopology=0
[2018-09-25T22:24:55.847] [TRACE] decoder - Call decode for request(msgId=464)
[2018-09-25T22:24:55.847] [TRACE] io_7_conn_15 - Complete success for request(msgId=464) with true
[2018-09-25T22:24:55.847] [TRACE] io_7_conn_15 - After decoding request(msgId=464), buffer size is 6, and offset 6
[2018-09-25T22:24:55.847] [DEBUG] client - Invoke addListener(msgId=466,event=modify,opts={"listenerId":"blblbl"}) locally
{color:red}[2018-09-25T22:24:55.848] [TRACE] listener - Create listener emitter for connection undefined and listener with listenerId=blblbl{color:red}
[2018-09-25T22:24:55.848] [DEBUG] client - Invoke addListener(msgId=467,event=remove,opts={"listenerId":"listener_465"}) locally
{code}
So the first line creates "create" event listener remotely. For the "modify" and "delete" events the "addLocalListener()" function is called. I am worried about the line marked in red, there the connection is passed as {color:red}undefined{color}.
I have found out that the connection parameter is not passed to protocol's addListener function when it is called from addLocalListener() function, but couldn't find a way to fix that.
Should it be that way?
I know that this kind of scenario is hardly possible but just in case the developer did some mistake, perhaps he/she may spend much time on finding why the event is not fired.
The code for generating this log is given here:
{code}
...code in the test...
it('fails when trying to attach to non-existent listener', function(done) {
client.then(function (client) {
var clientAddListenerCreate = client.addListener(
'create', function(key) { console.log('[Event] Created key: ' + key); });
var clientAddListeners = clientAddListenerCreate.then(
function(listenerId) {
// Multiple callbacks can be associated with a single client-side listener.
// This is achieved by registering listeners with the same listener id
// as shown in the example below.
var clientAddListenerModify = client.addListener(
'modify', function(key) { console.log('[Event] Modified key: ' + key); },
{listenerId: 'blblbl'});
var clientAddListenerRemove = client.addListener(
'remove', function(key) { console.log('[Event] Removed key: ' + key); },
{listenerId: listenerId});
return Promise.all([clientAddListenerModify, clientAddListenerRemove]);
});
var clientCreate = clientAddListeners.then(
function() { return client.putIfAbsent('eventful', 'v0'); });
var clientModify = clientCreate.then(
function() { return client.replace('eventful', 'v1'); });
var clientRemove = clientModify.then(
function() { return client.remove('eventful'); });
var clientRemoveListener =
Promise.all([clientAddListenerCreate, clientRemove]).then(
function(values) {
var listenerId = values[0];
return client.removeListener(listenerId);
});
}).catch(t.failed(done)).finally(done);
});
........
{code}
> Registering listener with undefined listenerId does nothing
> -----------------------------------------------------------
>
> Key: HRJS-79
> URL: https://issues.jboss.org/browse/HRJS-79
> Project: Infinispan Javascript client
> Issue Type: Bug
> Reporter: Anna Manukyan
> Priority: Major
>
> I was trying the following scenario: the case when the listenerId is passed while adding new listeners.
> I was creating 3 listeners for create,modify and remove events. While adding listeners for modify and remove events I was passing the listenerId, but for modify event the listenerId was some nonexistent string.
> I was curious what will happen. From the functional side nothing happened, so the modify event is not fired and from the logs I can see the following:
> {code}
> [2018-09-25T22:24:55.845] [DEBUG] client - Invoke addListener(msgId=464,event=create,listenerId=listener_465,opts=undefined) remotely
> [2018-09-25T22:24:55.845] [TRACE] encoder - Encode operation with topology id 0
> [2018-09-25T22:24:55.846] [TRACE] listener - Create listener emitter for connection 127.0.0.1:11222@conn_15 and listener with listenerId=listener_465
> [2018-09-25T22:24:55.846] [TRACE] io_7 - Write buffer(msgId=464) to 127.0.0.1:11222@conn_15: A0D0031D2500000300010D00010D000C6C697374656E65725F343635000000000F
> [2018-09-25T22:24:55.847] [TRACE] decoder - Read header(msgId=464): opCode=38, status=0, hasNewTopology=0
> [2018-09-25T22:24:55.847] [TRACE] decoder - Call decode for request(msgId=464)
> [2018-09-25T22:24:55.847] [TRACE] io_7_conn_15 - Complete success for request(msgId=464) with true
> [2018-09-25T22:24:55.847] [TRACE] io_7_conn_15 - After decoding request(msgId=464), buffer size is 6, and offset 6
> [2018-09-25T22:24:55.847] [DEBUG] client - Invoke addListener(msgId=466,event=modify,opts={"listenerId":"blblbl"}) locally
> {color:red}[2018-09-25T22:24:55.848] [TRACE] listener - Create listener emitter for connection undefined and listener with listenerId=blblbl{color}
> [2018-09-25T22:24:55.848] [DEBUG] client - Invoke addListener(msgId=467,event=remove,opts={"listenerId":"listener_465"}) locally
> {code}
> So the first line creates "create" event listener remotely. For the "modify" and "delete" events the "addLocalListener()" function is called. I am worried about the line marked in red, there the connection is passed as {color:red}undefined{color}.
> I have found out that the connection parameter is not passed to protocol's addListener function when it is called from addLocalListener() function, but couldn't find a way to fix that.
> Should it be that way?
> I know that this kind of scenario is hardly possible but just in case the developer did some mistake, perhaps he/she may spend much time on finding why the event is not fired.
> The code for generating this log is given here:
> {code}
> ...code in the test...
> it('fails when trying to attach to non-existent listener', function(done) {
> client.then(function (client) {
> var clientAddListenerCreate = client.addListener(
> 'create', function(key) { console.log('[Event] Created key: ' + key); });
> var clientAddListeners = clientAddListenerCreate.then(
> function(listenerId) {
> // Multiple callbacks can be associated with a single client-side listener.
> // This is achieved by registering listeners with the same listener id
> // as shown in the example below.
> var clientAddListenerModify = client.addListener(
> 'modify', function(key) { console.log('[Event] Modified key: ' + key); },
> {listenerId: 'blblbl'});
> var clientAddListenerRemove = client.addListener(
> 'remove', function(key) { console.log('[Event] Removed key: ' + key); },
> {listenerId: listenerId});
> return Promise.all([clientAddListenerModify, clientAddListenerRemove]);
> });
> var clientCreate = clientAddListeners.then(
> function() { return client.putIfAbsent('eventful', 'v0'); });
> var clientModify = clientCreate.then(
> function() { return client.replace('eventful', 'v1'); });
> var clientRemove = clientModify.then(
> function() { return client.remove('eventful'); });
> var clientRemoveListener =
> Promise.all([clientAddListenerCreate, clientRemove]).then(
> function(values) {
> var listenerId = values[0];
> return client.removeListener(listenerId);
> });
> }).catch(t.failed(done)).finally(done);
> });
> ........
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month