diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-07-16 23:00:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-16 23:00:25 -0700 |
| commit | a524b4f485ce5aa2f234c742bd7d1e75386f569b (patch) | |
| tree | 794b343485e4adace63dc091703d2368f9075616 /weed/notification/webhook/webhook_queue.go | |
| parent | 89706d36dccc5d851ef6b818f0dd32249e6560a3 (diff) | |
| download | seaweedfs-a524b4f485ce5aa2f234c742bd7d1e75386f569b.tar.xz seaweedfs-a524b4f485ce5aa2f234c742bd7d1e75386f569b.zip | |
Object locking need to persist the tags and set the headers (#6994)
* fix object locking read and write
No logic to include object lock metadata in HEAD/GET response headers
No logic to extract object lock metadata from PUT request headers
* add tests for object locking
* Update weed/s3api/s3api_object_handlers_put.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update weed/s3api/s3api_object_handlers.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor
* add unit tests
* sync versions
* Update s3_worm_integration_test.go
* fix legal hold values
* lint
* fix tests
* racing condition when enable versioning
* fix tests
* validate put object lock header
* allow check lock permissions for PUT
* default to OFF legal hold
* only set object lock headers for objects that are actually from object lock-enabled buckets
fix --- FAIL: TestAddObjectLockHeadersToResponse/Handle_entry_with_no_object_lock_metadata (0.00s)
* address comments
* fix tests
* purge
* fix
* refactoring
* address comment
* address comment
* Update weed/s3api/s3api_object_handlers_put.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update weed/s3api/s3api_object_handlers_put.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update weed/s3api/s3api_object_handlers.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* avoid nil
* ensure locked objects cannot be overwritten
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Diffstat (limited to 'weed/notification/webhook/webhook_queue.go')
| -rw-r--r-- | weed/notification/webhook/webhook_queue.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/weed/notification/webhook/webhook_queue.go b/weed/notification/webhook/webhook_queue.go index d8f9a0734..f5853dc2d 100644 --- a/weed/notification/webhook/webhook_queue.go +++ b/weed/notification/webhook/webhook_queue.go @@ -196,7 +196,21 @@ func (w *Queue) logDeadLetterMessages() error { for { select { case msg := <-ch: - glog.Errorf("received dead letter message: %s, key: %s", string(msg.Payload), msg.Metadata["key"]) + if msg == nil { + glog.Errorf("received nil message from dead letter channel") + continue + } + key := "unknown" + if msg.Metadata != nil { + if keyValue, exists := msg.Metadata["key"]; exists { + key = keyValue + } + } + payload := "" + if msg.Payload != nil { + payload = string(msg.Payload) + } + glog.Errorf("received dead letter message: %s, key: %s", payload, key) case <-w.ctx.Done(): return } |
