Support awaiting in ape-manager add and remove handlers #1506

Open
opened 2024-11-19 17:25:33 +00:00 by aarifullin · 1 comment
Member

As A client is able to set an APE-chain for a container requesting the apemanager service. The problem is that adding/removing chain to/from Policy contract is performed asynchronously - the service sends a transaction and returns the response immediately. Therefore, the client is obliged to make sure if the chain is dispatched to the policy contract, i.e. the blockchain has accepted this transaction.

We should support await mechanism for these handlers - the response is returned as soon as the transaction is accepted -> the chain is set to policy contract.

Describe the solution you'd like

Use the same approach for await from #1496

Describe alternatives you've considered

Extend API with awaitParams. Make Add and Remove wait for transaction is accepted (we could use the same approach for notary deposit and container creation), but @fyrchik reminded we don't consider this idea

## Is your feature request related to a problem? Please describe. As A client is able to set an APE-chain for a container requesting the `apemanager` service. The problem is that adding/removing chain to/from `Policy` contract is performed asynchronously - the service sends a transaction and returns the response immediately. Therefore, the client is obliged to make sure if the chain is dispatched to the `policy` contract, i.e. the blockchain has accepted this transaction. We should support await mechanism for these handlers - the response is returned **as soon as** the transaction is **accepted** -> the chain is set to `policy` contract. ## Describe the solution you'd like Use the same approach for `await` from #1496 ## Describe alternatives you've considered Extend API with `awaitParams`. Make `Add` and `Remove` wait for transaction is accepted (we could use the same approach for notary deposit and container creation), but @fyrchik [reminded](https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/1506#issuecomment-58444) we don't consider this idea
aarifullin added the
discussion
label 2024-11-19 17:25:33 +00:00
Owner

As we have discussed offline, do not extend the API.
The mechanism should be similar to #1496

As we have discussed offline, do not extend the API. The mechanism should be similar to https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/1496
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1506
No description provided.