On 01/19/2016 06:02 PM, Sela, Guy wrote:
Hi,
I looked at the code of FlowCapableInventoryProvider.
The thread that polls from the queue (Named
“FlowCapableInventoryProvider”) died at our system, because of an
exception in one of the handlers.
Why isn’t the run() loop protected from exceptions?
__
_FlowCapableInventoryProvider_
__
Nothing protects the run() from Exceptions.
@Override
public void run() {
try {
for (; ; ) {
InventoryOperation op = queue.take();
int ops = 0;
final ArrayList<InventoryOperation> opsToApply = new
ArrayList<>(MAX_BATCH);
do {
opsToApply.add(op);
ops++;
if (ops < MAX_BATCH) {
op = queue.poll();
} else {
op = null;
}
} while (op != null);
submitOperations(opsToApply);
}
} catch (final InterruptedException e) {
LOG.info("Processing interrupted, terminating", e);
}
// Drain all events, making sure any blocked threads are unblocked
while (!queue.isEmpty()) {
queue.poll();
}
}
The exception:
Exception in thread "FlowCapableInventoryProvider"
java.lang.IllegalArgumentException: Instance identifier references
(urn:opendaylight:inventory?revision=2013-08-19)node-connector[{(urn:opendaylight:inventory?revision=2013-08-19)*id=openflow:4:3*}]
but data identifier is
ImmutableMapEntryNode{nodeIdentifier=(urn:opendaylight:inventory?revision=2013-08-19)node-connector[{(urn:opendaylight:inventory?revision=2013-08-19)*id=3*}],
value=[ImmutableLeafNode{nodeIdentifier=(urn:opendaylight:inventory?revision=2013-08-19)id,
value=3, attributes={}}], attributes={}}
You have a mismatch between the instance identifier where the data is
being written to and the data itself. The two IDs (highlighted) have to
match.
Bye,
Robert
_______________________________________________
openflowplugin-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev