mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
Merge pull request #748 from seaweedfs/docs/lease-regrant-floor
docs: the re-grant floor is for an expired lease or a forced move; a refused restore changes nothing
This commit is contained in:
commit
682d0e4d02
2 files changed
+7
-2
No files matched your search
@@ -891,7 +891,7 @@ A restore makes a new volume from a snapshot. The new volume reads every chunk i
|
||||
#### Lifetime of a restore target
|
||||
|
||||
- **The source snapshot cannot be deleted** while v2 exists: `ops chunk snapshot-delete` is refused with `snapshot_has_dependents`. Delete v2 first (see [Delete a volume](volume-lifecycle.md#delete-a-volume)); the snapshot can be deleted after that.
|
||||
- **A snapshot of v2 cannot be restored:** it names the source's chunks. The restore exits 1 with `"code":"not_admitted"` and a message ending in `snapshot names another volume's chunks: "<snapshot>"`. The refused request still leaves the target's name bound to it, so a later restore under that name from another snapshot is refused with `target_exists`: restore from the source's snapshot under a new target name.
|
||||
- **A snapshot of v2 cannot be restored:** it names the source's chunks. The restore exits 1 with `"code":"not_admitted"` and a message ending in `snapshot names another volume's chunks: "<snapshot>"`. The refused restore changes nothing: the target name stays free, and a restore from the source's own snapshot may use it.
|
||||
- **v2's own writes stay in v2:** the source's snapshot never changes.
|
||||
- **Deleting v2 releases the source snapshot:** `ops chunk volume-delete` of v2 removes it from the snapshot's dependents.
|
||||
- **`ops chunk release` is a repair step, not part of this procedure.** `sw-block ops chunk release --master MASTER --source v1 --target v2 --chunk-filer FILER` removes a restore target from its source snapshot's dependents. It works only when the target no longer names the source's chunks (it was deleted), or when the target never got its first HEAD (an interrupted restore). In the second case it first tombstones the target's name, so that name can never be created. A live target is refused with `target_live`.
|
||||
|
||||
@@ -353,7 +353,12 @@ blockmaster grants the lease again only after a barrier: the stored lease horizo
|
||||
(up to 45 s after the last renewal) and the last grant, each plus
|
||||
`--workspace-max-clock-skew` (default `20s`). With the defaults that is at most
|
||||
**65 seconds after the process stopped**; if blockmaster restarted meanwhile, also at
|
||||
least 50 seconds (30 s plus the skew) after that restart, whichever is later. The
|
||||
least 50 seconds (30 s plus the skew) after that restart, whichever is later. That
|
||||
barrier applies to a lease that expired against blockmaster's stored horizon (this
|
||||
case) and to a forced move to another holder. A holder whose own grant ran out while
|
||||
the stored horizon is still ahead, and a live holder renewing at the same epoch, are
|
||||
granted at once, also right after a blockmaster restart (as long as they renew within
|
||||
the lease TTL of that restart). The
|
||||
refusal says when: `workspace lease: renewal failed after ...: workspace forced move
|
||||
lease expiry plus clock-skew margin has not elapsed (re-grant refused until <time>, in
|
||||
<duration>)`. The process sleeps until just after that time (then polls every 200 ms
|
||||
|
||||
Reference in new issue
Block a user