mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
webdav: pin an upload's final update to the Object Lock state it read
An upload writes the whole entry back when it closes. A hold or retention set on the new object while the upload was buffering would be dropped, so the filer now refuses the update if that state changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e6ace2d929
commit
674b5765e5
1 file changed
+4
-3
@@ -819,9 +819,10 @@ func (f *WebDavFile) Write(buf []byte) (int, error) {
|
||||
f.entry.Attributes.Mtime = time.Now().Unix()
|
||||
|
||||
request := &filer_pb.UpdateEntryRequest{
|
||||
Directory: dir,
|
||||
Entry: f.entry,
|
||||
Signatures: []int32{f.fs.signature},
|
||||
Directory: dir,
|
||||
Entry: f.entry,
|
||||
Signatures: []int32{f.fs.signature},
|
||||
ExpectedExtended: objectLockState(f.entry),
|
||||
}
|
||||
|
||||
if _, err := client.UpdateEntry(ctx, request); err != nil {
|
||||
|
||||
Reference in new issue
Block a user