Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ryansimmen
Copy link
Member

@ryansimmen ryansimmen commented Apr 4, 2020

Execute long running restore tasks in parallel by leveraging moreutils parallel.

This resolves https://github.com/github/ghes-infrastructure/issues/407

Most of this work is based upon work done in #597

@ryansimmen ryansimmen requested review from dbussink, lildude and snh April 4, 2020 21:36
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch 2 times, most recently from 5a5b659 to bde8ae9 Compare April 4, 2020 22:41
@ryansimmen ryansimmen changed the title Execute ghe-restore tasks in parallel Beta: Execute ghe-restore tasks in parallel Apr 4, 2020
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 6a47bf3 to d263c8a Compare April 5, 2020 17:12
@ryansimmen ryansimmen changed the base branch from ryansimmen/parallel-backup to master April 5, 2020 18:16
@ryansimmen ryansimmen changed the base branch from master to ryansimmen/parallel-backup April 5, 2020 18:17
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch 3 times, most recently from 775123b to 21c22e3 Compare April 5, 2020 23:59
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 495c243 to 71b4e67 Compare April 6, 2020 00:32
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch from 21c22e3 to 4a49554 Compare April 6, 2020 00:35
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 71b4e67 to 01cabcd Compare April 6, 2020 00:38
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch from 4a49554 to fa01a30 Compare April 6, 2020 00:48
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 01cabcd to 53912d8 Compare April 6, 2020 01:10
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch from fa01a30 to 1eea224 Compare April 6, 2020 01:11
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-backup branch from 53912d8 to c8eccf8 Compare April 6, 2020 02:25
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch 3 times, most recently from 2c89a01 to 0883e2a Compare April 6, 2020 23:42
@ryansimmen ryansimmen force-pushed the ryansimmen/parallel-restore branch from 0883e2a to dcee3b0 Compare April 7, 2020 01:25
@ryansimmen ryansimmen changed the base branch from ryansimmen/parallel-backup to master April 7, 2020 01:31
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ghe-ssh "$GHE_HOSTNAME" -- /bin/bash 1>&3
done

ghe-ssh "$GHE_HOSTNAME" -- "sudo sh -c 'rm $GHE_REMOTE_DATA_USER_DIR/elasticsearch-restore/*.gz'" 1>&3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When both ghe-restore-es-audit-log and ghe-restore-es-hookshot run at the same time during parallel restore, there is a race condition whereupon ghe-ssh "$GHE_HOSTNAME" -- "sudo sh -c 'rm $GHE_REMOTE_DATA_USER_DIR/elasticsearch-restore/*.gz'" 1>&3 from one script deletes the *.gz files that the other script had put down. I moved these files to separate directories so this wouldn't happen and my fix for the single-vm or configured edge case is to copy all files to the elasticsearch-restore folder so elasticsearch-post-start will process them accordingly.

Copy link
Member

@snh snh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@ryansimmen ryansimmen merged commit 99108bc into master Apr 7, 2020
@dbussink dbussink deleted the ryansimmen/parallel-restore branch April 8, 2020 08:16
This was referenced Jun 9, 2020
amildahl pushed a commit that referenced this pull request Nov 28, 2023
reverting changes to redis restart mechanism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants