dapr v1.15.6 版本更新介绍
发布日期: 2025-06-30
版本号: v1.15.6
Dapr 1.15.6版本主要修复了多个关键问题,包括:解决Actor因内存泄漏导致长时间运行时进程占用内存持续增长直至崩溃的问题,通过优化锁释放机制来解决;修复Workflow在高吞吐场景下因状态存储循环锁竞争导致的性能下降;调整并发工作流操作的最大数量默认值以提升处理能力;移除注入器中不必要的客户端速率限制以提高性能;允许在没有工作流监听流的情况下调度工作流,避免无限挂起;确保Daprd在Placement信息分发后再连接调度器以减少错误;为调度器增加重试逻辑以防止高负载下的死锁;在Leader主机关闭时增加DNS刷新重试机制以保证Actor正常工作;以及修复Kafka PubSub在重平衡时偶尔丢弃消息的问题。这些修复旨在提升系统的稳定性、性能和可靠性。
更新内容 (中文)
Dapr 1.15.6
本次更新包含错误修复:
- 修复 Actor 内存泄漏
- 修复 Workflow 状态存储争用
- 更新最大并发 Workflow 操作数
- 从注入器中移除客户端速率限制器
- 允许非流式 Workflow 调度
- 在 Placement 分发后连接调度器
- 修复高负载下的调度器死锁
- 修复 leader 关闭期间的 Placement 重连
- 修复 Kafka PubSub 在重试期间偶尔丢弃消息的问题
修复 Actor 内存泄漏
问题
运行 Actor 或 Workflow 工作负载时, daprd 进程的内存使用量会随时间持续增长。
影响
长时间运行 Actor 或 Workflow 会导致 daprd 进程耗尽所有可用内存,从而引发 OOM 崩溃。
根本原因
在 daprd 调用远程 Actor 的情况下,Actor 锁定机制在使用后不会释放对象内存。
解决方案
将 Actor 消息锁定延迟到托管该 Actor ID 的 daprd 上执行,以确保锁定对象内存始终在使用后释放。
修复 Workflow 状态存储争用
问题
在高吞吐量场景下运行 Workflow 时,处理或阻止 Workflow 状态存储操作会出现争用。
影响
Workflow 操作性能下降,导致延迟增加和潜在超时。
根本原因
Actor Workflow 状态操作中存在循环的 Placement 锁定。
解决方案
移除 Workflow 状态操作中的 Placement 锁定,因为该操作已在 Actor 级别进行了锁定。
更新最大并发 Workflow 操作数
问题
Workflow 在高吞吐量场景下性能会下降。
影响
Workflow 可处理的并发操作数量受到限制,导致延迟增加和潜在超时。
根本原因
maxConcurrentWorkflowInvocations 和 maxConcurrentActivityInvocations 的默认值设置为 1000,在高吞吐量场景下可能导致性能问题。
解决方案
将 maxConcurrentWorkflowInvocations 和 maxConcurrentActivityInvocations 的默认值增加到 max int32 值,以允许处理更多并发操作而不会出现争用。
从注入器中移除客户端速率限制器
问题
注入器使用的客户端速率限制器可能在高吞吐量场景的生产环境中导致节流问题。
影响
当注入器负载过重时,性能会下降并可能导致服务中断。
根本原因
注入器中的客户端速率限制器不必要地限制了操作,在高流量场景中造成瓶颈。
解决方案
从注入器中移除客户端速率限制器,以提高性能并消除生产环境中的不必要节流。
允许非流式 Workflow 调度
问题
尝试在没有 Workflow 监听器流的 daprd 上调度 Workflow 时,会无限期挂起。
影响
尝试在没有 Workflow 监听器流的 daprd 上调度 Workflow 时会无限期挂起。
根本原因
daprd 会等待建立 Workflow 监听器流后才处理调度请求。
解决方案
允许在未建立 Workflow 监听器流的情况下调度 Workflow,从而实现调度请求的即时处理。
在 Placement 分发后连接调度器
问题
当系统中有待处理工作时连接 Workflow 流会导致大量错误。
影响
当系统中有待处理工作时连接 Workflow 流会导致大量错误,导致性能下降和现有 Workflow 可能超时。
根本原因
daprd 在 Placement 完成分发前就连接到 Scheduler 接收 Workflow 工作。
解决方案
确保 daprd 仅在 Placement 分发完成后连接到 Scheduler,以防止错误并确保 daprd 能够在没有争用的情况下处理 Workflow 工作。
修复高负载下的调度器死锁
问题
在高负载下(如高 Workflow 吞吐量),调度器会发生死锁。
影响
Workflow 和 Jobs API 将无法触发。
根本原因
调度器不会重试或处理与高争用相关的临时性 Etcd 错误。
解决方案
为调度器添加重试逻辑以处理临时性 Etcd 错误,防止死锁并确保在高负载条件下 Workflow 和 Jobs 能成功触发。
修复 leader 关闭期间的 Placement 重连
问题
daprd 无法找到 Placement leader 主机。
影响
Actor(或 Workflow)将无法继续正常运行。
根本原因
用于对 Placement 主机进行轮询的 daprd DNS 记录集在 leader 主机关闭时不会刷新。
解决方案
为 daprd 添加重试机制以刷新 Placement 主机的 DNS 记录集,确保即使在 leader 关闭事件期间也能始终找到当前 leader 主机。
修复 Kafka PubSub 在重试期间偶尔丢弃消息的问题
问题
Kafka PubSub 在重平衡或任何其他需要重新初始化消费者的事件期间重试时,会偶尔丢弃消息。
影响
发送到 Kafka PubSub 的消息在重试时可能丢失,导致潜在数据丢失和消息处理不一致。
根本原因
即使在重新初始化后,消费者中的消息处理循环仍会继续,如果消费者未准备好处理这些消息,这些消息将无法被处理。
解决方案
在 Kafka 消费器中发生重平衡或其他重新初始化事件时,正确退出处理循环。
更新内容 (原始)
Dapr 1.15.6
This update includes bug fixes:
- Fix Actor memory leak
- Fix Workflow state store contention
- Update Max Concurrent Workflow Operations
- Remove client-side rate limiter from injector
- Allow non-stream Workflow Schedule
- Scheduler connect after Placement dissemination
- Fix Scheduler Deadlock under high load
- Fix Placement reconnection during leader shutdown
- Fixed Kafka PubSub intermittently dropping messages while retrying
Fix Actor memory leak
Problem
Running Actor or Workflow workloads would see the daprd process consume more and more memory over time.
Impact
Running Actor or Workflow for long enough periods of time would see the daprd process consume all available memory, leading to an OOM crash.
Root cause
The Actor locking mechanism would not release object memory after use, in the case where the daprd it calling a remote Actor.
Solution
Defer Actor message locking to only the daprd which is hosting that Actor ID to ensure the lock object memory is always released after use.
Fix Workflow state store contention
Problem
Running Workflows in high throughput scenarios would see contention on processing or blocking Workflow state store operations.
Impact
Degraded performance of Workflow operations, leading to increased latency and potential timeouts.
Root cause
Circular Placement locking of Actor Workflow state operations.
Solution
Remove Placement locking in Workflow state operations as it is already locked at the Actor level.
Update Max Concurrent Workflow Operations
Problem
Workflows would experience degraded performance in high throughput scenarios.
Impact
Workflows would be limited in the number of concurrent operations they could handle, leading to increased latency and potential timeouts.
Root cause
The default value for maxConcurrentWorkflowInvocations and maxConcurrentActivityInvocations was set to 1000, which could lead to performance issues in high throughput scenarios.
Solution
Increase the default value for maxConcurrentWorkflowInvocations and maxConcurrentActivityInvocations to max int32 value, allowing for more concurrent operations to be processed without contention.
Remove client-side rate limiter from injector
Problem
The injector was using a client-side rate limiter that could cause throttling issues in production environments with high-throughput scenarios.
Impact
Degraded performance and potential service disruptions when the injector was under heavy load.
Root cause
The client-side rate limiter in the injector was unnecessarily restricting operations, causing bottlenecks in high-traffic scenarios.
Solution
Remove the client-side rate limiter from the injector to allow for better performance and eliminate unnecessary throttling in production environments.
Allow non-stream Workflow Schedule
Problem
Attempting to schedule a Workflow on a daprd with no Workflow listener stream would hang.
Impact
Attempting to schedule a Workflow on a daprd with no Workflow listener stream would hang indefinitely.
Root cause
The daprd would wait until a Workflow listener stream was established before processing the schedule request.
Solution
Allow scheduling of Workflows without requiring a Workflow listener stream to be established first. This allows for immediate processing of the schedule request.
Scheduler connect after Placement dissemination
Problem
Connecting a Workflow stream when there is worked queued in the system would cause a large number errors.
Impact
Connecting a Workflow stream when there is work queued in the system would cause a large number of errors, leading to degraded performance and potential timeouts on existing Workflows.
Root cause
Daprd would connect to Scheduler to receive Workflow work before Placement had disseminated.
Solution
Ensure that the daprd connects to the Scheduler only after Placement has disseminated, preventing errors and ensuring that the daprd is ready to process Workflow work without contention.
Fix Scheduler Deadlock under high load
Problem
Under high load, like with high Workflow through put, a Scheduler would deadlock.
Impact
Workflows and the Jobs API would fail to trigger.
Root cause
The Scheduler would not retry or handle transient Etcd errors related to high contention.
Solution
Add retry logic to the Scheduler to handle transient Etcd errors, preventing deadlocks and ensuring that Workflows and Jobs can be triggered successfully under high load conditions.
Fix Placement reconnection during leader shutdown
Problem
Daprd would fail to find the Placement leader host.
Impact
Actors (or Workflows) would fail to continue to function.
Root cause
The daprd DNS record set used to round robin the Placement hosts would not be refreshed in the event the leader host was shutdown.
Solution
Add a retry mechanism to the daprd to refresh the DNS record set for the Placement hosts, ensuring that it can always find the current leader host even during leader shutdown events.
Fixed Kafka PubSub intermittently dropping messages while retrying
Problem
Kafka PubSub would intermittently drop messages while retrying during rebalance or any other event requiring re-initialization of the consumer.
Impact
Messages sent to Kafka PubSub could be lost during retries, leading to potential data loss and inconsistencies in message processing.
Root cause
The processing loop for messages was continued in the consumer even after re-initialization, causing messages to no be processed if the consumer was not ready to process them.
Solution
Correctly breaking out of the processing loop in the Kafka consumer in the event of rebalancing or other re-initialization events.
下载链接
- daprd_darwin_amd64.tar.gz
- daprd_darwin_amd64.tar.gz.sha256
- daprd_darwin_arm64.tar.gz
- daprd_darwin_arm64.tar.gz.sha256
- daprd_linux_amd64-stablecomponents.tar.gz
- daprd_linux_amd64-stablecomponents.tar.gz.sha256
- daprd_linux_amd64.tar.gz
- daprd_linux_amd64.tar.gz.sha256
- daprd_linux_arm-stablecomponents.tar.gz
- daprd_linux_arm-stablecomponents.tar.gz.sha256
- daprd_linux_arm.tar.gz
- daprd_linux_arm.tar.gz.sha256
- daprd_linux_arm64-stablecomponents.tar.gz
- daprd_linux_arm64-stablecomponents.tar.gz.sha256
- daprd_linux_arm64.tar.gz
- daprd_linux_arm64.tar.gz.sha256
- daprd_windows_amd64.zip
- daprd_windows_amd64.zip.sha256
- grafana-actor-dashboard.json
- grafana-actor-dashboard.json.sha256
- grafana-sidecar-dashboard.json
- grafana-sidecar-dashboard.json.sha256
- grafana-system-services-dashboard.json
- grafana-system-services-dashboard.json.sha256
- injector_darwin_amd64.tar.gz
- injector_darwin_amd64.tar.gz.sha256
- injector_darwin_arm64.tar.gz
- injector_darwin_arm64.tar.gz.sha256
- injector_linux_amd64.tar.gz
- injector_linux_amd64.tar.gz.sha256
- injector_linux_arm.tar.gz
- injector_linux_arm.tar.gz.sha256
- injector_linux_arm64.tar.gz
- injector_linux_arm64.tar.gz.sha256
- injector_windows_amd64.zip
- injector_windows_amd64.zip.sha256
- operator_darwin_amd64.tar.gz
- operator_darwin_amd64.tar.gz.sha256
- operator_darwin_arm64.tar.gz
- operator_darwin_arm64.tar.gz.sha256
- operator_linux_amd64.tar.gz
- operator_linux_amd64.tar.gz.sha256
- operator_linux_arm.tar.gz
- operator_linux_arm.tar.gz.sha256
- operator_linux_arm64.tar.gz
- operator_linux_arm64.tar.gz.sha256
- operator_windows_amd64.zip
- operator_windows_amd64.zip.sha256
- placement_darwin_amd64.tar.gz
- placement_darwin_amd64.tar.gz.sha256
- placement_darwin_arm64.tar.gz
- placement_darwin_arm64.tar.gz.sha256
- placement_linux_amd64.tar.gz
- placement_linux_amd64.tar.gz.sha256
- placement_linux_arm.tar.gz
- placement_linux_arm.tar.gz.sha256
- placement_linux_arm64.tar.gz
- placement_linux_arm64.tar.gz.sha256
- placement_windows_amd64.zip
- placement_windows_amd64.zip.sha256
- scheduler_darwin_amd64.tar.gz
- scheduler_darwin_amd64.tar.gz.sha256
- scheduler_darwin_arm64.tar.gz
- scheduler_darwin_arm64.tar.gz.sha256
- scheduler_linux_amd64.tar.gz
- scheduler_linux_amd64.tar.gz.sha256
- scheduler_linux_arm.tar.gz
- scheduler_linux_arm.tar.gz.sha256
- scheduler_linux_arm64.tar.gz
- scheduler_linux_arm64.tar.gz.sha256
- scheduler_windows_amd64.zip
- scheduler_windows_amd64.zip.sha256
- sentry_darwin_amd64.tar.gz
- sentry_darwin_amd64.tar.gz.sha256
- sentry_darwin_arm64.tar.gz
- sentry_darwin_arm64.tar.gz.sha256
- sentry_linux_amd64.tar.gz
- sentry_linux_amd64.tar.gz.sha256
- sentry_linux_arm.tar.gz
- sentry_linux_arm.tar.gz.sha256
- sentry_linux_arm64.tar.gz
- sentry_linux_arm64.tar.gz.sha256
- sentry_windows_amd64.zip
- sentry_windows_amd64.zip.sha256