Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Guideline

Explanation

Make every lifepoint stand alone

Lifepoints do not build upon one another: they stand alone as a complete specification of the constraints that apply to the object in a provided date range. Include the complete set of constraints for a provided end date in the lifepoint header.

Correct lifepoint
Code Block
languagexml
Lifepoint: [] reps=1,deletable=no


Provide time in GMT

For HTTP-date, adhere to the Full Date Section 3.3.1 of the HTTP/1.1 specification. This means the indicated time must be specified in Greenwich Mean Time (GMT). GMT is exactly equal to UTC (Coordinated Universal Time) when dealing with Swarm.

Do not use deletable= without reps=

The delete constraint does not store a value and cannot include end-date :

Incorrect delete constraint
Code Block
languagexml
Lifepoint: [] reps=1
Lifepoint: [] deletable=no


Do not delete contexts by lifepoint

To protect content objects from being orphaned, Swarm does not allow lifepoint-triggered deletes of contexts (domains and bucket objects) to protect content objects from being orphaned.

See SCSP DELETE for guidance on deleting domains and buckets.

Do not replicate chunked uploads

Chunked uploads are erasure-coded automatically, so a request fails if it is chunked and the current lifepoint specifies replication.

To Specify two lifepoints to convert a chunked upload, specify two lifepoints: have the first specify an EC encoding expiring in one day, and have the second specify the number of replicas going forward:

Converting chunked to replication
Code Block
languagexml
Transfer-Encoding: chunked
Lifepoint: [Wed, 12 Dec 2016 15:59:02 GMT] reps=5:2 
Lifepoint: [] reps=3


Do not expect Swarm to validate lifepoints

To maximize performance, Swarm does not validate lifepoints when they are added to the cluster to maximize performance. Swarm accepts an invalid lifepoint and later logs an error if the HP cannot parse the lifepoint.

...

Constraint names and values are parsed by Swarm object classes called ConstraintSpecialists that maintain one or more related constraints. The reps constraint is parsed and maintained by the ReplicationConstraintSpecialist. In general, constraint names are case-sensitive, and constraint names not recognized by any of the ConstraintSpecialists are ignored. As a result, the The set of allowable constraints is extensible, and new constraint types may be added to the system in future releases.

...