Durability
What each kind of failure loses, what it keeps, and what a client sees.
This page is the durability contract of an export: for each kind of failure, what is kept, what can be lost, and what an application sees.
What the gateway promises
Two rules cover every failure below.
- A change to a name is kept once the call returns. A create, mkdir, rename, remove, link, symlink, chmod, chown, or extended attribute change returns only once it is stored on AIStor.
- Data is kept once it is synced. A write is kept once
fsync,fdatasyncorclosereturns, or when it returns if the file was opened withO_SYNCorO_DIRECT. AIStor stores the data before the call returns.
A call that returns an error makes no promise. When AIStor cannot be reached, a change
to a name can return EIO and still stand. Look before you repeat it: a create that
returned EIO can leave the file there.
Failures and what they keep
| Failure | What is kept | What can be lost | What a client sees |
|---|---|---|---|
| The application or the client node crashes | Every change that returned and every synced write | Writes the client still held in its own cache | Nothing on other clients |
| The gateway process on a node restarts | Everything that returned and was synced | Nothing. A write that was not synced yet is sent again by the client | Calls wait for the restart. Opening a file can wait up to 90 seconds while clients reclaim their locks |
| A gateway node is lost, with its disk | Everything that returned and was synced: it is on AIStor | Nothing. A write that was not synced yet is sent again by the client | Other nodes take its part of the namespace in about 33 seconds. Clients that mounted through the lost node wait, or mount through another node |
| AIStor loses drives or nodes within its parity | Everything | Nothing. AIStor heals the lost copies | Nothing, or slower calls while AIStor heals |
| AIStor loses more than its parity allows | What AIStor can still read | The objects AIStor cannot rebuild | AIStor stops taking writes. Reads of what it cannot rebuild return EIO |
| AIStor cannot be reached from a gateway node | Everything that returned before | Nothing that returned | Changes to names, fsync, and close return EIO until AIStor answers again |
| A gateway node is cut off from the other nodes | Everything that returned before | Nothing that returned | The node stops serving its part of the namespace, and other nodes take it over. Its clients get errors or wait until it is back |
| The whole cluster loses power | Everything that returned and was synced | Writes not synced yet whose client also lost power | The export serves again once AIStor and the gateways are back |
| Data or metadata is damaged where it is stored | Everything AIStor or the gateway can repair | Nothing that AIStor's erasure coding can rebuild | A read that finds bytes belonging to another file returns EIO. Damaged metadata on a gateway node is rebuilt from AIStor before the node serves it again |
Moving to another gateway node
A client stays with the node it mounted through. When that node is lost, a client on a
hard mount waits until the node is back, and a client on a soft mount gets EIO.
To go on sooner, mount the export through another node: every node serves every file.
AIStor does not move a lost node's client address to another node yet.
See POSIX and NFS support for how each behavior compares with a local file system.