jvpp: bugfix for deadlock in java future API (VPP-1037) 57/8957/9
authorMatej <matej.perina@pantheon.tech>
Mon, 23 Oct 2017 10:55:11 +0000 (12:55 +0200)
committerDamjan Marion <dmarion.lists@gmail.com>
Mon, 30 Oct 2017 11:06:57 +0000 (11:06 +0000)
commit7008da2667d2876bc58aa5ae57c4a9de48cc756b
treeb68ab5e0363733d848161279efb9f353a2e40f62
parent04b68bdc481f21f864da63dfe36b2f05b64714a8
jvpp: bugfix for deadlock in java future API (VPP-1037)

- message sending method inside synchronization blocks causes
deadlock between sending and receiving part
- breaking atomicity of sending message and putting future with
corresponding id to map needs additional handling by writer and receiver,
regardless which part get access to sync block first will create
new future and second one will complete it and remove from map,
in case of dump calls where control ping reply is required
as confirmation that all information were send, if ping reply is
received before writer put future in map, reader will create
regular control ping future instead and writer needs to made association
between these two futures

Change-Id: Id29a19be7a5319291a5e07cf931080610178f00c
Signed-off-by: Matej <matej.perina@pantheon.tech>
src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/JVppRegistryImpl.java
src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/AbstractFutureJVppInvoker.java
src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py