From 87a2965427a716194115a5484edc35dc1b33649f Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Mon, 24 Jun 2024 23:52:23 +0200 Subject: [PATCH 1/2] Add car generatio nto warehouse scripts. --- warehouse-upload-to-storage-bucket.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/warehouse-upload-to-storage-bucket.sh b/warehouse-upload-to-storage-bucket.sh index b459ccf..3fc4137 100644 --- a/warehouse-upload-to-storage-bucket.sh +++ b/warehouse-upload-to-storage-bucket.sh @@ -83,6 +83,23 @@ while true; do fi fi + if [[ -n $OLD_FAITHFUL ]]; then + EPOCH=`cat $archive_dir/epoch | tr -d '\n'` + if [[ ! -f "$archive_dir"/.old-faithful ]]; then + echo "Generating epoch-$EPOCH.car from $archive_dir" + SECONDS= + while ! timeout 48h radiance car create2 $EPOCH --db=$rocksdb --out="$archive_dir/epoch-$EPOCH.car"; do + echo "old faithful generation failed..." + datapoint_error old-faithful-generation-failure + sleep 30 + done + touch "$archive_dir"/.old-faithful + + echo Car generation took $SECONDS seconds + datapoint old-faithful-generation-complete "duration_secs=$SECONDS" + fi + fi + echo "Creating rocksdb.tar.bz2 in $archive_dir" rm -rf rocksdb.tar.bz2 tar jcf rocksdb.tar.bz2 rocksdb From fcaa9758417152cdfae6d84914d5c82334177876 Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Mon, 24 Jun 2024 23:58:07 +0200 Subject: [PATCH 2/2] Added check if we have all of the slots --- warehouse-upload-to-storage-bucket.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/warehouse-upload-to-storage-bucket.sh b/warehouse-upload-to-storage-bucket.sh index 3fc4137..c94c4cf 100644 --- a/warehouse-upload-to-storage-bucket.sh +++ b/warehouse-upload-to-storage-bucket.sh @@ -86,17 +86,22 @@ while true; do if [[ -n $OLD_FAITHFUL ]]; then EPOCH=`cat $archive_dir/epoch | tr -d '\n'` if [[ ! -f "$archive_dir"/.old-faithful ]]; then - echo "Generating epoch-$EPOCH.car from $archive_dir" - SECONDS= - while ! timeout 48h radiance car create2 $EPOCH --db=$rocksdb --out="$archive_dir/epoch-$EPOCH.car"; do - echo "old faithful generation failed..." - datapoint_error old-faithful-generation-failure - sleep 30 - done - touch "$archive_dir"/.old-faithful - - echo Car generation took $SECONDS seconds - datapoint old-faithful-generation-complete "duration_secs=$SECONDS" + if ! timeout 2h radiance car create2 "$EPOCH" --db=$rocksdb --out="$archive_dir/epoch-$EPOCH.car" --check; then + echo "This epoch does not have access to a full set of slots from the epoch." + datapoint_error old-faithful-generation-slots-missing + else + echo "Generating epoch-$EPOCH.car from $archive_dir" + SECONDS= + while ! timeout 48h radiance car create2 $EPOCH --db=$rocksdb --out="$archive_dir/epoch-$EPOCH.car"; do + echo "old faithful generation failed..." + datapoint_error old-faithful-generation-failure + sleep 30 + done + touch "$archive_dir"/.old-faithful + + echo Car generation took $SECONDS seconds + datapoint old-faithful-generation-complete "duration_secs=$SECONDS" + fi fi fi