[PR #34] [MERGED] Handle mutated task in RDB's Done, Retry, Kill methods #1567

Closed
opened 2026-03-07 22:11:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/34
Author: @hibiken
Created: 12/30/2019
Status: Merged
Merged: 12/31/2019
Merged by: @hibiken

Base: masterHead: fix/mutated_payload


📝 Commits (2)

  • 52559ff Handle mutated task in RDB's Done, Retry, Kill methods
  • b793827 Add benchmark tests for rdb

📊 Changes

4 files changed (+411 additions, -69 deletions)

View changed files

📝 internal/asynqtest/asynqtest.go (+66 -66)
internal/rdb/benchmark_test.go (+37 -0)
📝 internal/rdb/rdb.go (+45 -3)
📝 internal/rdb/rdb_test.go (+263 -0)

📄 Description

It is possible that user mutates the task's payload in Handler (Although doc says the task in handler is read-only). Prevent inconsistent states by handling the case where user mutates the task.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynq/pull/34 **Author:** [@hibiken](https://github.com/hibiken) **Created:** 12/30/2019 **Status:** ✅ Merged **Merged:** 12/31/2019 **Merged by:** [@hibiken](https://github.com/hibiken) **Base:** `master` ← **Head:** `fix/mutated_payload` --- ### 📝 Commits (2) - [`52559ff`](https://github.com/hibiken/asynq/commit/52559ff26e7dc8333313b8f92f651026adf83770) Handle mutated task in RDB's Done, Retry, Kill methods - [`b793827`](https://github.com/hibiken/asynq/commit/b793827adcc0705b2e1c0a1fe9032f9b7e88467f) Add benchmark tests for rdb ### 📊 Changes **4 files changed** (+411 additions, -69 deletions) <details> <summary>View changed files</summary> 📝 `internal/asynqtest/asynqtest.go` (+66 -66) ➕ `internal/rdb/benchmark_test.go` (+37 -0) 📝 `internal/rdb/rdb.go` (+45 -3) 📝 `internal/rdb/rdb_test.go` (+263 -0) </details> ### 📄 Description It is possible that user mutates the task's payload in Handler (Although doc says the task in handler is read-only). Prevent inconsistent states by handling the case where user mutates the task. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-07 22:11:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#1567
No description provided.