Call getPartyInfo before requestAllTransactionsFromNode in order to e… #459
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the SyncPoller performs requestAllTransactionsFromNode it may happen that the target tessera node does not yet have the Recipient info for the requesting node.
In such cases the following exception is encountered (on the target tessera node):
09:02:38.709 [grizzly-http-server-13] ERROR c.q.t.a.e.KeyNotFoundExceptionMapper - com.quorum.tessera.key.exception.KeyNotFoundException: Recipient not found at com.quorum.tessera.node.PartyInfoServiceImpl.lambda$getURLFromRecipientKey$2(PartyInfoServiceImpl.java:68) ~[tessera-app-0.7-SNAPSHOT-app.jar:na] at java.util.Optional.orElseThrow(Optional.java:290) ~[na:1.8.0_172] at com.quorum.tessera.node.PartyInfoServiceImpl.getURLFromRecipientKey(PartyInfoServiceImpl.java:68) ~[tessera-app-0.7-SNAPSHOT-app.jar:na] at com.quorum.tessera.enclave.EnclaveImpl.publishPayload(EnclaveImpl.java:115) ~[tessera-app-0.7-SNAPSHOT-app.jar:na] at com.quorum.tessera.enclave.EnclaveImpl.lambda$null$1(EnclaveImpl.java:150) ~[tessera-app-0.7-SNAPSHOT-app.jar:na] at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_172] at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080) ~[na:1.8.0_172] at com.quorum.tessera.enclave.EnclaveImpl.lambda$resendAll$2(EnclaveImpl.java:149) ~[tessera-app-0.7-SNAPSHOT-app.jar:na] at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_172] at com.quorum.tessera.enclave.EnclaveImpl.resendAll(EnclaveImpl.java:148) ~[tessera-app-0.7-SNAPSHOT-app.jar:na] at com.quorum.tessera.api.TransactionResource.resend(TransactionResource.java:265) ~[tessera-app-0.7-SNAPSHOT-app.jar:na]
In order to ensure that the target tessera has the requesting node info the SyncPoller was updated to call getPartyInfo before any requestAllTransactionsFromNode.