Cached document embeddings shift to the wrong inputs after an invalid vector is skipped

Cached document embeddings shift to the wrong inputs after an invalid vector is skipped

该问题通常出现在 Dify 自托管环境中批量生成文档嵌入(缓存嵌入)时:当某个输入的向量无效(归一化后为 NaN)而被跳过,缩短后的有效向量列表会错位压缩,导致后续有效向量与错误的输入(文本哈希或文件 ID)配对并写入缓存。排查重点是 CacheEmbedding 中跳过无效向量后“有效向量与原批次