Skip to content

Commit

Permalink
Disable the deletion of parts when overwriting a SLO
Browse files Browse the repository at this point in the history
  • Loading branch information
AymericDu committed Jan 11, 2019
1 parent eed851b commit 5088c3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions oioswift/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ def __init__(self, conf, memcache=None, logger=None, account_ring=None,

self.storage = storage or \
ObjectStorageApi(sds_namespace, endpoint=sds_proxy_url, **sds_conf)
self.delete_slo_parts = \
config_true_value(conf.get('delete_slo_parts', True))
# self.delete_slo_parts = \
# config_true_value(conf.get('delete_slo_parts', True))
self.delete_slo_parts = False
self.check_state = \
config_true_value(conf.get('check_state', False))

Expand Down
6 changes: 4 additions & 2 deletions tests/functional/s3-multipart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ ${AWS} s3 cp "$MULTI_FILE" "s3://$BUCKET/obj"

echo "Counting segments with openio CLI (should be the same)"
SEG_COUNT2=$(openio object list ${BUCKET}+segments -f value | wc -l)
[ "$SEG_COUNT" -eq "$SEG_COUNT2" ]
# [ "$SEG_COUNT" -eq "$SEG_COUNT2" ]
[ $(echo "$SEG_COUNT * 2" | bc -l) -eq "$SEG_COUNT2" ] # FIXME(adu)

echo "Overwriting with a small object (not multipart)"
${AWS} s3 cp "$SMALL_FILE" "s3://$BUCKET/obj"

echo "Counting segments with openio CLI (should be zero)"
SEG_COUNT3=$(openio object list ${BUCKET}+segments -f value | wc -l)
[ "$SEG_COUNT3" -eq "0" ]
# [ "$SEG_COUNT3" -eq "0" ]
[ "$SEG_COUNT3" -eq "$SEG_COUNT2" ] # FIXME(adu)

echo
echo "Cleanup"
Expand Down

0 comments on commit 5088c3d

Please sign in to comment.