[BNE] It is impossible to create a group with the same id if the previous request failed

Description

The following error appears when trying to create a group with the group_id previously failed due to the DuplicateBusinessNetworkGroupException: Request of BUSINESS_NETWORK_GROUP_ID type with <group_id> data already exists. Looks like BNLock is created outside of try {} block (checkGroupExistence function of CreateGroupFlow), so DuplicateBusinessNetworkGroupException exception isnt' caught and BNLock is not removed.

Steps to reproduce:

  1. Clone the repo:

  2. Deploy nodes:

  3. Start the nodes:

  4. Create a Business Network from Bank A node:

  5. Obtain network ID and initial group ID from Bank A:

  6. Request membership from Bank B node:

  7. Obtain requested membership IDs for Bank B:

  8. Activate Bank B membership requests from Bank A node:

  9. Add newly activated Bank B membersinto initial group and change the group name:

  10. Try to create new group with the same name (the request is failed with the following reason: Business Network Group with MainGroup name already exists in Business Network with <OBTAINED_NETWORK_ID> ID):

  11. Try to create new group with the different name and previous group_id:

Expected result: new group is successfully created
Actual result: the creation request fails with the following reason: Request of BUSINESS_NETWORK_GROUP_ID type with <group_id> data already exists.

Please find the logs attached (see group_creation_issue.tar.gz tarball)

Activity

Show:
Alexey Chernikov
November 29, 2020, 6:13 AM

Checked. All the tests are passed. Group is successfully created now.

Components/versions tested: bne-1.1-RC03, corda-4.7-RC03

Logs and configs are attached.

 

Done

Assignee

Alexey Chernikov

Reporter

Alexey Chernikov

Labels

Sprint

None

Epic Link

None

Priority

Medium

Engineering Teams

None

Fix versions

Affects versions

Ported to...

None

Story Points / Dev Days

None

Build cut

None

Squad

None