增量查询会选取所有记录,而不是只选取新记录
了解如何修复增量查询无法按预期工作的Adobe Campaign Classic问题。
描述 description
环境
Campaign Classic
问题/症状
增量查询无法按预期工作。 与仅提取自上次运行以来的新记录不同,他们每次都会提取所有记录,就像正常的查询活动一样。
解决方法 resolution
已在Adobe Campaign Classic 20.1.1版本(内部版本9122及更高版本)中修复此问题。
用户可以使用的 解决方法:
解决方法1:停止清理工作流并间歇性地运行该工作流以清理数据库和HDD,直到修复完成并且可用。 如果您没有计划的升级,则建议不要这样做。
解决方法2:假定增量查询活动受到影响。 与增量查询一样,通过创建持久模式来保存历史记录表内容,从而解决此问题。 使用查询和更新数据活动的组合来模拟行为。 对于需要增量查询的所有工作流,需要执行此操作。
解决方法3: 假设增量查询活动受到影响。 通过将审核字段tsCreated/tsLastModified添加到相关架构来解决此问题。 然后,您的增量查询将转换为具有Where子句(如tscreated< GetDate())的普通查询活动。
解决方法4:
- 创建新序列
xtknewworkflowid并将其初始化为远离当前workflowId范围的值。 - 更改
xtkworkflow架构以使用此pkSequence。 - 要求用户克隆所有受影响的工作流并删除原始工作流。
- 用户准备好升级后,通过恢复到
xtknewId以创建工作流来移除此修复(以避免意外意外)。
原因
主要问题是清理工作流。
增量查询工作流的工作方式如下:
- 维护历史记录表,其中包含以前小版本的结果。
- 从目标查询中获取所有行。
- 过滤出历史记录表中的所有行
- 将剩余结果添加到历史记录表中,以供下一次迭代筛选。
历史记录工作表名称具有以下表示法:wkfhisto<workflowid> <activityName>_
现在,对于workflowID < 0(对于xtknewid允许负数序列的用户),我们看到它实际上是:
wkfhisto<(uint)workflowid> <activityName>_
Although this is okay for workflow execution.
So, for example, the incremental activity incremental1 of workflow ID=-1 will create a table wkfhisto4294967295_incremental1.
The thing which is missed is the CleanUp workflow.
Here, we have a code that tries to delete worktables of deleted workflows.
A dedicated code here lists all the wkfhisto tables, extracts the workflowId from their names (from the above convention), and deletes them all except the ones whose worklowIDs are found in the xtkworkflow table.
However, it misses the uint part.
So, it tries to look up a workflow with ID 4294967295 instead of casting this back to int. Since this workflow is not found, this table is deleted. Next time, when this workflow runs, the incremental query activity does not find an existing history table and creates it thinking of this as the first run ever.