0.7.50
This commit is contained in:
@@ -100,6 +100,8 @@ pub struct LocalPipelineReplayResult {
|
||||
pub pool_admin_event_count: usize,
|
||||
/// Total orderbook event materialization results returned by replayed non-trade calls.
|
||||
pub orderbook_event_count: usize,
|
||||
/// Total token-account event materialization results returned by replayed non-trade calls.
|
||||
pub token_account_event_count: usize,
|
||||
/// Total candle upsert results returned by replayed candle calls.
|
||||
///
|
||||
/// This is a replay write/result counter, not the number of distinct rows
|
||||
@@ -367,6 +369,7 @@ impl LocalPipelineReplayService {
|
||||
result.reward_event_count += non_trade_result.reward_event_count;
|
||||
result.pool_admin_event_count += non_trade_result.pool_admin_event_count;
|
||||
result.orderbook_event_count += non_trade_result.orderbook_event_count;
|
||||
result.token_account_event_count += non_trade_result.token_account_event_count;
|
||||
},
|
||||
Err(error) => {
|
||||
result.non_trade_materialization_error_count += 1;
|
||||
@@ -521,6 +524,29 @@ impl LocalPipelineReplayService {
|
||||
}
|
||||
|
||||
async fn refresh_event_coverage_best_effort(&self) {
|
||||
let cpmm_cleanup_result =
|
||||
crate::query_dex_decoded_events_delete_replaced_raydium_cpmm_instruction_audits(
|
||||
self.database.as_ref(),
|
||||
None,
|
||||
)
|
||||
.await;
|
||||
match cpmm_cleanup_result {
|
||||
Ok(deleted_count) => {
|
||||
if deleted_count > 0 {
|
||||
tracing::info!(
|
||||
deleted_count = deleted_count,
|
||||
"replaced Raydium CPMM instruction audits cleaned before dex event coverage refresh"
|
||||
);
|
||||
}
|
||||
},
|
||||
Err(error) => {
|
||||
tracing::warn!(
|
||||
error = %error,
|
||||
"Raydium CPMM replaced instruction-audit cleanup failed before dex event coverage refresh"
|
||||
);
|
||||
},
|
||||
}
|
||||
|
||||
let cleanup_result =
|
||||
crate::query_dex_decoded_events_delete_replaced_raydium_clmm_instruction_audits(
|
||||
self.database.as_ref(),
|
||||
@@ -586,6 +612,46 @@ impl LocalPipelineReplayService {
|
||||
},
|
||||
}
|
||||
|
||||
let post_refresh_cpmm_cleanup_result =
|
||||
crate::query_dex_decoded_events_delete_replaced_raydium_cpmm_instruction_audits(
|
||||
self.database.as_ref(),
|
||||
None,
|
||||
)
|
||||
.await;
|
||||
match post_refresh_cpmm_cleanup_result {
|
||||
Ok(deleted_count) => {
|
||||
if deleted_count > 0 {
|
||||
tracing::info!(
|
||||
deleted_count = deleted_count,
|
||||
"replaced Raydium CPMM instruction audits cleaned after dex event coverage refresh"
|
||||
);
|
||||
let second_refresh_result = coverage_service.refresh_local_counts(None).await;
|
||||
match second_refresh_result {
|
||||
Ok(second_refresh_result) => {
|
||||
tracing::debug!(
|
||||
upserted_entry_count = second_refresh_result.upserted_entry_count,
|
||||
refreshed_entry_count = second_refresh_result.refreshed_entry_count,
|
||||
summary_count = second_refresh_result.summaries.len(),
|
||||
"dex event coverage refreshed after Raydium CPMM instruction-audit cleanup"
|
||||
);
|
||||
},
|
||||
Err(error) => {
|
||||
tracing::warn!(
|
||||
error = %error,
|
||||
"dex event coverage refresh failed after Raydium CPMM instruction-audit cleanup"
|
||||
);
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
Err(error) => {
|
||||
tracing::warn!(
|
||||
error = %error,
|
||||
"Raydium CPMM replaced instruction-audit cleanup failed after dex event coverage refresh"
|
||||
);
|
||||
},
|
||||
}
|
||||
|
||||
let post_refresh_upstream_cleanup_result =
|
||||
crate::query_dex_decoded_events_delete_locally_covered_upstream_instruction_matches(
|
||||
self.database.as_ref(),
|
||||
|
||||
Reference in New Issue
Block a user