Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

This section provides general information about SCSP DELETE that applies to both named and unnamed objects.

DELETE is a request to the storage cluster to remove a specific object. The DELETE request is formatted as a simple an HTTP request using the DELETE method.

SCSP Method

HTTP Method

RFC 7231 Section

SCSP DELETE

DELETE

4.3.5

DELETE for

...

Named Objects

Code Block
languagexml
DELETE /bucket/photo.jpg HTTP/1.1
  Host: cluster.example.com
  User-Agent: Swarm Client/0.1

Guidelines for DELETE

  • For bucket requests, use a separate initialization or setup routine that runs less frequently. Swarm is optimized for calls on individual objects, not domains or buckets (which are centralized resources), so do not make bucket calls on the high-availability code path of

    your

    a client application.

  • Reuse object names. After a named object is deleted, another object with the same name can be created in the same bucket. Unlike unnamed objects, whose UUIDs are not reused, names can be reused.

  • Pause before recreating. Deleting a named object involves an underlying update, for Swarm to write a special marker value to the name. When recreating a named object after deleting it,

    be sure to

    wait at least one second.

DELETE for

...

Domains and

...

Buckets

Delete any objects contained within a domain or bucket , you need to also delete any objects contained within it, when deleting them or else these objects will be are orphaned, lost, and consuming consume disk space unnecessarily. These deletes are recursive, iterating until every object contained in the domain or bucket is dealt with. 

...

...

Note

...

Swarm generates an SCSP error if attempting to delete a domain or bucket without having a recursive argument or parameter in force

...

.

To The recursive query argument must be included to delete a domain or bucket, you must include the recursive query argument:

  • recursive | recursive=true|yes

  • recursive=now

    • Grants no grace period. The health processor begins reclaiming the space immediately.

If you have Avoid changing the recursive argument if existing integrations that do not use the recursive argument, you can avoid changing them by adding argument. Add a global configuration parameter: scsp.autoRecursiveDelete=True.

If you An erroneously deleted a domain or bucket , you can get it back can be restored without data loss if it is within the grace period. See Restoring Domains and Buckets.

Reusing

...

Bucket Names

A bucket can be deleted and another bucket with the same name . However, be aware of the followingcan be recreated:

  • The new bucket is a different bucket that happens to have the same name.

  • After you delete a bucket, all

    All objects in

    that

    a bucket are inaccessible after deleting it, even if

    you subsequently create

    another bucket with the same name is subsequently created.

practice
Infotip
title

Best

Practice

Wait at least twice the value of cache.realmStaleTimeout before

you attempt

attempting to recreate a bucket with the same name as a bucket

just

deleted: the default is 600 seconds (10 minutes), so

you should

wait 20 minutes, then create the new bucket. This waiting period

applies only to

applies to reusing names of buckets: deleting a named object and recreating an object with that name requires

only

a 1-second pause.

DELETE for

...

Unnamed Objects

Code Block
languagexml
DELETE /7A25E6067904EAC8002498CF1AE33023 HTTP/1.1
  User-Agent: Swarm Client/0.1

...

Warning

Error

Error loading excerpt from "WRITE for Unnamed Objects

...

".

The content associated with the name or UUID supplied in the request is no longer available if the method succeeds. This does not imply that all copies of the content were are erased. The cluster now responds to any READ request for that UUID with a an HTTP 404 Not Found error.

...

Note

Swarm deletes both the manifests and the segments of an erasure-coded object. Erasure coding

...

allows storage of larger objects with a smaller footprint. See Working with Large Objects.

 An object can be deleted by an application or lifecycle as follows:

...

  • Application deleting an object - All online replicas in a single cluster are removed immediately after a delete method is executed on an object. (An online replica is one that resides on a cluster node

    that is on line

    online at the time the delete is issued.)

    In addition, the cluster remembers

    The cluster recalls the name or UUID has been deleted for 14 days, in the event that one or more nodes holding replicas of the deleted object are off line at the time the delete was issued.

  • Policy deleting an object - An object can have a storage policy defined by the application and stored along with it. Part of the storage policy

    might

    may be an expiration period, beyond which the object is to be removed. In the case of a policy-defined deletion, all replicas, wherever they are stored, are deleted at approximately the same time and become unavailable at most one second after the expiration date and time.

...

Note

The UUID of a deleted object is

...

not reused, even if the object is mutable.

DELETE for alias

...

Objects

To delete alias objects, add a query argument alias:

Code Block
languagexml
DELETE /7A25E6067904EAC8002498CF1AE33023?alias HTTP/1.1
  User-Agent: Swarm Client/0.1

...

Warning

Error

Error loading excerpt from "WRITE for Unnamed Objects

...

".