adm: Allow to tick epoch concurrently #592

Merged
fyrchik merged 1 commit from fyrchik/frostfs-node:adm-concurrent-tick into master 2023-08-10 16:40:02 +00:00
Owner

Epoch can be ticked by IR in the background. Because the only usecase
for this is to apply some changes, the right behaviour is ignoring an
error, not retrying.

Testing:

$ cat multi.sh
#!/bin/sh

ADM="../node/bin/frostfs-adm"

for i in $(seq 1 10); do
    "$ADM" morph force-new-epoch \
        -c frostfs-adm.yml \
        -r http://morph-chain.frostfs.devenv:30333 &
done

sleep 10
$ ./multi.sh
Current epoch: 11, increase to 12.
Waiting for transactions to persist...
Current epoch: 11, increase to 12.
Current epoch: 11, increase to 12.
Waiting for transactions to persist...
Waiting for transactions to persist...
Current epoch: 11, increase to 12.
Current epoch: 11, increase to 12.
Waiting for transactions to persist...
Waiting for transactions to persist...
Current epoch: 11, increase to 12.
Waiting for transactions to persist...
Current epoch: 11, increase to 12.
Current epoch: 11, increase to 12.
Waiting for transactions to persist...
Waiting for transactions to persist...
Current epoch: 11, increase to 12.
Waiting for transactions to persist...
Current epoch: 11, increase to 12.
Waiting for transactions to persist...
Epoch has already ticked.
Epoch has already ticked.
Epoch has already ticked.
Epoch has already ticked.
Epoch has already ticked.
Epoch has already ticked.
Epoch has already ticked.
Epoch has already ticked.
Epoch has already ticked.
Epoch can be ticked by IR in the background. Because the only usecase for this is to apply some changes, the right behaviour is ignoring an error, not retrying. Testing: ``` $ cat multi.sh #!/bin/sh ADM="../node/bin/frostfs-adm" for i in $(seq 1 10); do "$ADM" morph force-new-epoch \ -c frostfs-adm.yml \ -r http://morph-chain.frostfs.devenv:30333 & done sleep 10 ``` ``` $ ./multi.sh Current epoch: 11, increase to 12. Waiting for transactions to persist... Current epoch: 11, increase to 12. Current epoch: 11, increase to 12. Waiting for transactions to persist... Waiting for transactions to persist... Current epoch: 11, increase to 12. Current epoch: 11, increase to 12. Waiting for transactions to persist... Waiting for transactions to persist... Current epoch: 11, increase to 12. Waiting for transactions to persist... Current epoch: 11, increase to 12. Current epoch: 11, increase to 12. Waiting for transactions to persist... Waiting for transactions to persist... Current epoch: 11, increase to 12. Waiting for transactions to persist... Current epoch: 11, increase to 12. Waiting for transactions to persist... Epoch has already ticked. Epoch has already ticked. Epoch has already ticked. Epoch has already ticked. Epoch has already ticked. Epoch has already ticked. Epoch has already ticked. Epoch has already ticked. Epoch has already ticked. ```
fyrchik changed title from [#xx] adm: Allow to tick epoch concurrently to adm: Allow to tick epoch concurrently 2023-08-10 12:06:50 +00:00
fyrchik force-pushed adm-concurrent-tick from 7f650171a6 to a739c57a06 2023-08-10 12:07:06 +00:00 Compare
fyrchik requested review from storage-core-committers 2023-08-10 12:08:04 +00:00
fyrchik requested review from storage-core-developers 2023-08-10 12:08:05 +00:00
acid-ant approved these changes 2023-08-10 12:16:00 +00:00
fyrchik merged commit dd988a5912 into master 2023-08-10 16:40:02 +00:00
fyrchik deleted branch adm-concurrent-tick 2023-08-10 16:40:03 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
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#592
No description provided.