Skip to content

Commit

Permalink
Remove Old Version Tracker (#561)
Browse files Browse the repository at this point in the history
* Remove unused version tracker

* Remove write side monotonic invariant for backfills as its maintained by the read side
  • Loading branch information
dermanyang authored Oct 24, 2024
1 parent 9c4836b commit b0aa88f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 164 deletions.

This file was deleted.

1 change: 0 additions & 1 deletion rust/sdk-processor/src/steps/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod latest_processed_version_tracker;
pub mod processor_status_saver;

pub use processor_status_saver::get_processor_status_saver;
24 changes: 16 additions & 8 deletions rust/sdk-processor/src/steps/common/processor_status_saver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,23 @@ impl ProcessorStatusSaver for ProcessorStatusSaverEnum {
.on_conflict(backfill_processor_status::backfill_alias)
.do_update()
.set((
backfill_processor_status::backfill_status.eq(excluded(backfill_processor_status::backfill_status)),
backfill_processor_status::last_success_version.eq(excluded(backfill_processor_status::last_success_version)),
backfill_processor_status::last_updated.eq(excluded(backfill_processor_status::last_updated)),
backfill_processor_status::last_transaction_timestamp.eq(excluded(backfill_processor_status::last_transaction_timestamp)),
backfill_processor_status::backfill_start_version.eq(excluded(backfill_processor_status::backfill_start_version)),
backfill_processor_status::backfill_end_version.eq(excluded(backfill_processor_status::backfill_end_version)),
backfill_processor_status::backfill_status
.eq(excluded(backfill_processor_status::backfill_status)),
backfill_processor_status::last_success_version
.eq(excluded(backfill_processor_status::last_success_version)),
backfill_processor_status::last_updated
.eq(excluded(backfill_processor_status::last_updated)),
backfill_processor_status::last_transaction_timestamp.eq(excluded(
backfill_processor_status::last_transaction_timestamp,
)),
backfill_processor_status::backfill_start_version
.eq(excluded(backfill_processor_status::backfill_start_version)),
backfill_processor_status::backfill_end_version
.eq(excluded(backfill_processor_status::backfill_end_version)),
)),
Some(" WHERE backfill_processor_status.last_success_version <= EXCLUDED.last_success_version "),
).await?;
None,
)
.await?;
Ok(())
},
}
Expand Down

0 comments on commit b0aa88f

Please sign in to comment.