Await control.SetNetmapStatus() #1496

Merged
fyrchik merged 1 commit from fyrchik/frostfs-node:morph-wait-tx into master 2024-11-20 15:43:54 +00:00
Owner

Currently, netmap set-status awaits until the new status persists in the new network map, i.e. it waits for a new epoch to come.
I see how this can be useful, but here are some quirks:

  1. During testing we would like to make sure that after an epoch tick the status will update. Current --await flag is useless for this scenario.
  2. The old implementation doesn't handle errors at all, so we will wait full timeout, without real necessity. Not to mention that epoch time may vary and 30-min constant we currently use looks magic.

Another option would be to always await the transaction. IMO it would lead to a much cleaner API.
We have already encountered too many flaky tests because of this "not sure when the tx persists" . The tests themselves have timeout kludges.

Currently, `netmap set-status` awaits until the new status persists in the new network map, i.e. it waits for a new epoch to come. I see how this can be useful, but here are some quirks: 1. During testing we would like to make sure that after an epoch tick the status will update. Current `--await` flag is useless for this scenario. 2. The old implementation doesn't handle errors at all, so we will wait full timeout, without real necessity. Not to mention that epoch time may vary and 30-min constant we currently use looks magic. Another option would be to always await the transaction. IMO it would lead to a much cleaner API. We have already encountered too many flaky tests because of this "not sure when the tx persists" . The tests themselves have timeout kludges.
fyrchik added this to the v0.44.0 milestone 2024-11-14 07:27:07 +00:00
fyrchik added the
enhancement
discussion
frostfs-cli
frostfs-node
labels 2024-11-14 07:27:07 +00:00
fyrchik added 5 commits 2024-11-14 07:27:08 +00:00
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
WIP: cli: Change --await flag semantics in control set-status
Some checks failed
Tests and linters / Run gofumpt (pull_request) Successful in 1m37s
DCO action / DCO (pull_request) Failing after 1m53s
Tests and linters / Staticcheck (pull_request) Failing after 2m13s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m24s
Vulncheck / Vulncheck (pull_request) Successful in 2m17s
Build / Build Components (pull_request) Successful in 2m41s
Tests and linters / Lint (pull_request) Failing after 2m47s
Tests and linters / gopls check (pull_request) Successful in 2m57s
Tests and linters / Tests (pull_request) Successful in 4m31s
Tests and linters / Tests with -race (pull_request) Successful in 6m12s
5cdca40598
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik changed title from Allow to await netmap set-status to WIP: Allow to await netmap set-status 2024-11-14 07:28:43 +00:00
fyrchik requested review from storage-core-committers 2024-11-14 07:28:53 +00:00
fyrchik requested review from storage-core-developers 2024-11-14 07:28:58 +00:00
fyrchik changed title from WIP: Allow to await netmap set-status to WIP: cli: Allow to await netmap set-status 2024-11-14 07:30:04 +00:00
fyrchik force-pushed morph-wait-tx from 5cdca40598 to f967af9e3d 2024-11-14 12:10:09 +00:00 Compare
fyrchik changed title from WIP: cli: Allow to await netmap set-status to Await control.SetNetmapStatus() 2024-11-14 12:10:35 +00:00
Member

Please update commit messages.

Please update commit messages.
acid-ant approved these changes 2024-11-15 09:46:25 +00:00
Dismissed
fyrchik force-pushed morph-wait-tx from f967af9e3d to 1863647a75 2024-11-15 10:37:27 +00:00 Compare
dstepanov-yadro requested changes 2024-11-15 13:24:14 +00:00
Dismissed
@ -0,0 +36,4 @@
func (c *Client) WaitTxHalt(ctx context.Context, p InvokeRes) error {
w, err := waiter.NewPollingBased(&waiterClient{c: c})
if err != nil {
return fmt.Errorf("could not create notary deposit waiter: %w", err)

notary deposit waiter -> waiter

`notary deposit waiter` -> `waiter`
Author
Owner

Fixed

Fixed
fyrchik force-pushed morph-wait-tx from 1863647a75 to d82f0d1926 2024-11-15 13:36:12 +00:00 Compare
fyrchik dismissed acid-ant's review 2024-11-15 13:36:13 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

acid-ant approved these changes 2024-11-15 14:12:42 +00:00
dstepanov-yadro approved these changes 2024-11-15 14:25:41 +00:00
fyrchik merged commit d82f0d1926 into master 2024-11-15 15:07:04 +00:00
fyrchik deleted branch morph-wait-tx 2024-11-15 15:07:05 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 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#1496
No description provided.