Skip to content

Commit 3fbacd9

Browse files
authored
Merge pull request ceph#56133 from ivancich/wip-restore-bucket-index-tempdir
rgw: rgw-restore-bucket-index -- sort uses specified temp dir Reviewed-by: Michael Kidd <[email protected]>
2 parents 3f1672c + a14dad1 commit 3fbacd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rgw/rgw-restore-bucket-index

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# version 2024-03-04
3+
# version 2024-03-11
44

55
# rgw-restore-bucket-index is an EXPERIMENTAL tool to use in case
66
# bucket index entries for objects in the bucket are somehow lost. It
@@ -65,7 +65,7 @@ EOF
6565
# cleans all temporary files
6666
clean() {
6767
if [ "$clean_temps" == 1 ] ;then
68-
rm -f $bkt_entry $temp_file_list
68+
rm -f $bkt_entry $temp_file_list \
6969
$zone_info $olh_info_enc $olh_info_json
7070
fi
7171
}
@@ -272,7 +272,7 @@ handle_versioned() {
272272
test_temp_space
273273
rados -p $pool stat2 $obj --object-locator "$loc"
274274
done | # output of stat2, which includes mtime
275-
sort -k 3 | # stat2 but sorted by mtime earlier to later
275+
sort -T $temp_dir -k 3 | # stat2 but sorted by mtime earlier to later
276276
grep -v -e "$filter_out_last_instance" | # remove the final instance in case it's not last
277277

278278
# sed 1) removes pool and marker, 2) removes indicator of

0 commit comments

Comments
 (0)