Skip to content

Commit b7e6285

Browse files
committed
[FIX] removing skipping already validation rebuilt
This was only rarely occurring, and it was causing an issue because we were re-adding files in add_dependents_to_validation which is valid for when something in base depends on a model. which is not common enough to cause errors, but leaving it like so can leave some base files not built and stuck and pending
1 parent a5e855b commit b7e6285

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

server/src/core/odoo.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ impl SyncOdoo {
687687
session.sync_odoo.import_cache = Some(ImportCache{ modules: HashMap::new(), main_modules: HashMap::new() });
688688
let mut already_arch_rebuilt: HashSet<Tree> = HashSet::new();
689689
let mut already_arch_eval_rebuilt: HashSet<Tree> = HashSet::new();
690-
let mut already_validation_rebuilt: HashSet<Tree> = HashSet::new();
691690

692691
//workdone progress
693692
let mut last_update_status = Instant::now() - Duration::from_secs(10);
@@ -719,6 +718,9 @@ impl SyncOdoo {
719718
}
720719
let sym = session.sync_odoo.pop_item(BuildSteps::ARCH);
721720
if let Some(sym_rc) = sym {
721+
if DEBUG_THREADS {
722+
trace!("PROCESSING FROM ARCH - {}", sym_rc.borrow().paths().first().unwrap_or(&sym_rc.borrow().name().to_string()));
723+
}
722724
let (tree, entry) = sym_rc.borrow().get_tree_and_entry();
723725
if already_arch_rebuilt.contains(&tree) {
724726
info!("Already arch rebuilt, skipping");
@@ -731,6 +733,9 @@ impl SyncOdoo {
731733
}
732734
let sym = session.sync_odoo.pop_item(BuildSteps::ARCH_EVAL);
733735
if let Some(sym_rc) = sym {
736+
if DEBUG_THREADS {
737+
trace!("PROCESSING FROM ARCH_EVAL - {}", sym_rc.borrow().paths().first().unwrap_or(&sym_rc.borrow().name().to_string()));
738+
}
734739
let (tree, entry) = sym_rc.borrow().get_tree_and_entry();
735740
if already_arch_eval_rebuilt.contains(&tree) {
736741
info!("Already arch eval rebuilt, skipping");
@@ -743,12 +748,10 @@ impl SyncOdoo {
743748
}
744749
let sym = session.sync_odoo.pop_item(BuildSteps::VALIDATION);
745750
if let Some(sym_rc) = sym {
746-
let (tree, entry) = sym_rc.borrow_mut().get_tree_and_entry();
747-
if already_validation_rebuilt.contains(&tree) {
748-
info!("Already validation rebuilt, skipping");
749-
continue;
751+
if DEBUG_THREADS {
752+
trace!("PROCESSING FROM VALIDATION - {}", sym_rc.borrow().paths().first().unwrap_or(&sym_rc.borrow().name().to_string()));
750753
}
751-
already_validation_rebuilt.insert(tree);
754+
let (_, entry) = sym_rc.borrow_mut().get_tree_and_entry();
752755
if session.sync_odoo.state_init == InitState::ODOO_READY {
753756
let mut no_validation = no_validation;
754757
if session.sync_odoo.interrupt_rebuild.load(Ordering::SeqCst) {
@@ -921,6 +924,9 @@ impl SyncOdoo {
921924
}
922925

923926
pub fn remove_from_rebuild(&mut self, symbol: &Rc<RefCell<Symbol>>, step: BuildSteps) {
927+
if DEBUG_THREADS {
928+
trace!("REMOVED FROM {step:?} - {}", symbol.borrow().paths().first().unwrap_or(&symbol.borrow().name().to_string()));
929+
}
924930
if step == BuildSteps::ARCH {
925931
self.rebuild_arch.remove(symbol);
926932
} else if step == BuildSteps::ARCH_EVAL {

0 commit comments

Comments
 (0)