Skip to content

Commit 914efeb

Browse files
committed
enhance fast path logic in update_source_row to include version verification
1 parent 4e8398e commit 914efeb

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/execution/row_indexer.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,16 @@ pub async fn update_source_row(
592592
let stored_info = evaluation_memory.into_stored()?;
593593

594594
// Content hash optimization: if content hasn't changed, use fast path
595-
if let (Some(existing_info), Some(existing_content_hash)) =
596-
(&memoization_info, &stored_info.content_hash)
597-
{
598-
if existing_info.content_hash.as_ref() == Some(existing_content_hash) {
599-
// Content unchanged - use fast path to update only tracking info
595+
// Verify ordinal allows processing
596+
if let (Some(existing_version), Some(existing_info), Some(existing_content_hash)) = (
597+
&existing_version,
598+
&memoization_info,
599+
&stored_info.content_hash,
600+
) {
601+
if !existing_version.should_skip(source_version, None)
602+
&& existing_info.content_hash.as_ref() == Some(existing_content_hash)
603+
{
604+
// Ordinal allows processing AND content unchanged - use fast path
600605
db_tracking::update_source_ordinal_and_fingerprints_only(
601606
src_eval_ctx.import_op.source_id,
602607
&source_key_json,

0 commit comments

Comments
 (0)