Graceful reconnect feature of RPC causes exception to drop connection

Description

From External contributors:
https://github.com/corda/corda/issues/5908

I have some RPC client code that calls the RPC call uploadAttachmentWithMetadata. If the attachment already exists, I catch the DuplicateAttachmentException and just return the hash. Here is the Scala code that does that:

When NOT using the new graceful reconnect feature, this works fine (as it did in 4.2). However, if I use the graceful reconnect feature when connecting to RPC, the DuplicateAttachmentException is never caught and causes the RPC connection to drop. The log then shows repeated attempts to reconnect but is never successful.
This is how we connect without graceful reconnect:

This is how we connect with graceful reconnect:

 

Assignee

Dmitry Toropov

Reporter

David Rapacchiale

Priority

Medium

Ported to...

Corda 4.4
Corda Enterprise 4.4
Corda 4.5

Feature Team

Kernel Group

CVSS Vector

None

Engineering Teams

None

Severity

Medium
Configure