mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
* volume: refuse a batch delete while a replica is offline BatchDelete now applies the replica check the HTTP delete path already uses: when the master lists fewer replicas than the volume's copy count, the delete is refused with 503 instead of applied to the replicas that remain. The caller retries, so the replica that was offline still gets the delete once it returns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * filer: retry deletes refused for an offline replica Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume(rust): refuse a batch delete while a replica is offline Mirrors the Go volume server: batch_delete checks that the master lists every replica of a replicated volume before deleting, and answers 503 with the replica count error otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * filer: move exhausted deletion retries to dead letter queues A deletion that still fails after the backed-off retries is no longer dropped. It moves to a dead letter queue retried after 24 hours, then to a second one retried after 48 hours, and is dropped only if that fails too. The id stays in the durable deletion ledger the whole time, so a restart replays it instead of losing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume: report a low-disk volume as read-only but deletable A volume is read-only while its disk is low on space, but it still applies deletes; only noWriteOrDelete refuses them. The heartbeat set readOnlyCanDelete from the operator mark alone, so the master listed a low-disk replica as refusing deletes and the replica count check rejected every delete on its volumes, on the healthy replicas too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume(rust): report a low-disk volume as read-only but deletable Mirrors the Go heartbeat: readOnlyCanDelete is set whenever the volume is read-only without no_write_or_delete, which includes low disk space. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * filer: retry deletes a low-disk replica could not record A low-disk volume now counts as deletable, but appending the tombstone can still fail with no space left on device. Treat that as retryable so the deletion stays queued instead of being dropped after the other replicas applied it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * master: keep under-replicated volumes out of empty-volume cleanup The cleanup only looked at the copies the master lists. With a replica offline the listed copies can be empty and quiet while the missing one still holds data, and deleting them would leave that copy as the only one when it returns. Low-disk replicas now report readOnlyCanDelete and pass the eligibility check, which made this reachable for more volumes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * master: finish a partly deleted empty volume in the next sweep When one copy's VolumeDelete succeeded and another failed, the vid was left with fewer copies than its replica placement, so every later sweep skipped it as under-replicated and the empty copy kept its slot. The vid now stays marked deleting after a partial delete, and the next sweep finishes it. The mark is cleared once the vid is gone or stops being an empty, quiet candidate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * master: keep the cleanup mark while a survivor is only read-only A partly deleted empty volume lost its deleting mark when the next sweep found a surviving copy read-only. Later sweeps then skipped the vid as under-replicated, so the empty copy kept its slot after it became deletable again. Only a copy that gained data or was written recently clears the mark now; a read-only or missing copy just postpones the cleanup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * shell: delete an empty volume only when every copy is empty volume.deleteEmpty judged each copy on its own, so it removed an empty copy while another copy still held data or was offline, leaving that one as the volume's only copy. Low-disk copies now report readOnlyCanDelete and passed the check as well. Apply the master sweep's rule: every copy is listed and every copy is empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * shell: name the copies a partial empty-volume delete leaves behind Once some copies of a volume are deleted, a rerun of volume.deleteEmpty skips the rest as under-replicated, and the shell keeps no state to finish them. Log each copy whose delete failed with the volume.delete command that removes it once it is empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * shell: keep the gRPC port in the printed volume.delete command ServerAddress.String() drops a custom gRPC port, so the printed -node would dial the HTTP port plus 10000. Print the full address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * filer: let manifest retries pass through the dead letter queues The manifest retry queue reuses DeletionRetryQueue, so a manifest that does not resolve now waits through both dead letter queues before it is deleted alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume(rust): look up a batch delete's replicas over the master's gRPC port lookup_volume now dials the master's gRPC port, as Go's LookupVolumeIds does; the replica check and its test follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume: let a batch delete through on a volume grown degraded A volume the master grew with fewer copies than its placement reports min_writable_copies in the lookup. Go's replica check already uses it; Rust now does too, so deletes on such a volume are not refused forever. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume, shell: let volume.merge write deletes into its merged copy volume.merge marks the source copies read-only and writes the merged records, deletes included, into a temporary copy that replaces them. The batch delete replica check counts only the temporary copy there and refused every delete, so the merge stopped at its first tombstone. BatchDeleteRequest.skip_replica_check lets a caller that updates the other copies itself skip the check; volume.merge sets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>