dapr v1.14.2 版本更新介绍
发布日期: 2024-09-06
版本号: v1.14.2
Dapr 1.14.2版本修复了多项问题:1. 解决了工作流运行时的内存泄漏问题,此前工作流执行结束后相关内存未释放,导致daprd内存持续增长直至崩溃,现修正为正确释放内存;2. 修复了从旧版本恢复状态时Placement Service因未初始化结构体导致的启动失败问题;3. 优化Kafka事件投递逻辑,对非URL编码的头部信息进行编码处理,避免投递失败;4. 调整AWS密钥管理与参数存储组件初始化逻辑,移除冗余的随机密钥检查,解决特定IAM策略下的初始化失败问题;5. 修复Kafka Avro验证中空字节数组被错误拒绝的问题,补充空值校验逻辑;6. 修复进程意外终止时Kafka消息丢失的极端情况,调整消息处理逻辑以支持重试;7. 修正Outbox功能在无应用通道或状态存储权限时无法发送消息的问题,解除内部主题订阅对应用通道的依赖。
更新内容 (中文)
Dapr 1.14.2
修复运行工作流时的内存泄漏问题
问题
使用工作流时,daprd 进程内存消耗会无限增长,最终因内存不足(OOM Kill)导致进程崩溃
影响
daprd 进程将占用主机的额外资源,并周期性地不可用,从而中断正在运行的任务
根本原因
Daprd 中的执行组件运行时未正确释放工作流执行组件及其关联状态(历史记录、收件箱等)的内存
解决方案
执行组件运行时现在会在工作流达到终止状态后正确释放其状态
修复从旧版本恢复 Placement Service 状态时出现的 nil 映射错误
问题
当使用磁盘日志的 Placement Service 实例升级至 1.14 版本时,某些情况下会出现 nil 映射错误导致服务无法启动
影响
Dapr Placement Service 实例无法启动
根本原因
旧格式的状态恢复操作会使用未正确初始化的结构体覆盖 Raft 中保存的状态
解决方案
恢复旧格式时对结构体进行正确初始化
修复未进行 URL 编码的 Kafka 标头导致 HTTP 事件投递失败
问题
当 Kafka 标头未进行 URL 编码时,事件投递到应用程序将出现可重试错误
影响
消息无法投递至应用程序
根本原因
未对 Kafka 标头值执行 URL 编码
解决方案
为 Kafka 标头添加 URL 编码
修复 AWS 密钥管理器和参数存储初始化问题
问题
当用户配置了仅允许访问特定密钥的 IAM 策略时,AWS 密钥管理器和参数存储组件的初始化会失败
影响
组件无法初始化
根本原因
初始化过程中存在冗余检查,试图读取随机密钥,当策略限制仅允许读取特定密钥时会导致失败
解决方案
移除了冗余检查
修复 Kafka Avro 对空值的验证问题
问题
使用 Kafka 且启用 Avro 验证时,发送包含空字节数组的消息会被错误拒绝
影响
无法发送消息
根本原因
缺少对空字节数组的验证逻辑
解决方案
添加了缺失的空值验证逻辑
修复进程终止时消息丢失的边缘情况
问题
在 daprd
进程异常终止的情况下,Dapr 本应重试的 Kafka 消息会被错误丢弃
影响
失败消息无法重试
根本原因
消息处理逻辑在会话上下文结束后继续处理下一条消息而非退出
解决方案
修改代码确保在处理下条消息前处理会话上下文退出
修复 Outbox 无法向用户主题发送消息
问题
使用 outbox 功能时,若发布者未开启应用通道或订阅者无权访问事务状态存储,outbox 消息将无法发布
影响
Outbox 消息无法发送
根本原因
错误的逻辑要求 Dapr 必须通过应用通道订阅内部主题
解决方案
允许 Dapr 无需应用通道即可订阅内部主题
更新内容 (原始)
Dapr 1.14.2
Fix Memory Leak when running Workflows
Problem
When using workflows, daprd would increase in memory consumption indefinitely, eventually causing daprd to crash from a Out Of Memory Kill (OOM Kill),
Impact
Daprd would consume extra resources from the host, and periodically become unavailable and disrupt running tasks.
Root cause
The actor runtime in Daprd was not releasing memory of workflow actors, and the associated workflow state (history, inbox, etc.).
Solution
The actor runtime now correctly releases the workflow state once that workflow has reached a terminal state.
Fix nil map error on Placement Service state restore from an older version
Problem
When a Placement Service instance using on disk logs was upgraded to 1.14 in some cases we would get a nil map error and the instance would not start.
Impact
Dapr Placement Service instance would not start.
Root cause
Restoring the old format would override the state saved in Raft with a struct that wasn’t properly initialised.
Solution
Initialize the struct properly when restoring the old format.
Fix non-URL encoded Kafka headers causing event delivery to fail over HTTP
Problem
When Kafka headers are present that are not URL encoded, the event delivery to the app will fail with a retriable error.
Impact
Messages cannot be delivered to the app.
Root cause
Lack of URL encoding on header values from Kafka.
Solution
Add URL encoding to Kafka headers.
Fix AWS Secret Manager and Parameter Store initialization
Problem
If users had IAM policies in place that only allowed access to specific secrets, the initialization of the AWS secret manager and parameter store components would fail.
Impact
Components could not be initialized.
Root cause
There was a redundant check in initialization that tried to read a random secret which caused the init to fail if a policy was present to only allow reading specific secrets.
Solution
The redundant check was removed.
Fix Kafka Avro validation for null values
Problem
When publishing a message containing a null byte array with Kafka and Avro validation enabled, the message would be rejected when it shouldn’t be.
Impact
A message could not be sent.
Root cause
There was a missing validation logic for null byte arrays that would allow the message to continue processing.
Solution
The missing validation logic was added.
Fix Kafka edge case of lost messages upon process termination
Problem
In certain cases, Dapr would drop a Kafka message when it should have been retried if the daprd
process is abruptly terminated.
Impact
A message would not be retried upon failure.
Root cause
Message processing logic moved on to process the next message instead of exiting when the session context was done.
Solution
The code was changed to handle session context exiting prior to processing the next message.
Fix Outbox not sending messages to the user topic
Problem
If outbox was being used and a publisher didn’t have an app channel open or the subscriber didn’t have access to the transactional state store, then outbox messages would not be published.
Impact
Outbox messages could not be sent.
Root cause
Faulty logic that required Dapr to have an app channel in order to subscribe to the internal topics.
Solution
Enable Dapr to subscribe to internal topics without needing an app channel.
下载链接
- 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