computer: libc sync

This commit is contained in:
nym21
2025-07-19 10:10:01 +02:00
parent dd51f91cab
commit ccaca524fe
10 changed files with 36 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
use std::{cmp::Ordering, collections::BTreeMap, mem, path::Path, thread, time::Instant};
use std::{cmp::Ordering, collections::BTreeMap, mem, path::Path, thread};
use brk_core::{
AnyAddressDataIndexEnum, AnyAddressIndex, ByAddressType, ByAnyAddress, CheckedSub, DateIndex,
@@ -531,6 +531,8 @@ impl Vecs {
starting_indexes: &mut Indexes,
exit: &Exit,
) -> color_eyre::Result<()> {
unsafe { libc::sync() }
let height_to_first_outputindex = &indexer.vecs.height_to_first_outputindex;
let height_to_first_inputindex = &indexer.vecs.height_to_first_inputindex;
let height_to_first_p2aaddressindex = &indexer.vecs.height_to_first_p2aaddressindex;
@@ -1265,6 +1267,10 @@ impl Vecs {
exit.block();
}
unsafe { libc::sync() }
// return Ok(());
info!("Computing overlapping...");
self.utxo_cohorts
@@ -1347,6 +1353,8 @@ impl Vecs {
self.utxo_cohorts
.compute_rest_part1(indexer, indexes, fetched, starting_indexes, exit)?;
unsafe { libc::sync() }
self.address_cohorts.compute_rest_part1(
indexer,
indexes,