File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
coprocessor/fhevm-engine/tfhe-worker/src Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,8 @@ impl LockMngr {
171171 )
172172 OR (
173173 lock_expires_at < NOW() -- Work-stealing of expired locks
174+ AND
175+ dependency_count = 0 -- No pending dependencies
174176 )
175177 ORDER BY last_updated_at ASC -- FIFO
176178 FOR UPDATE SKIP LOCKED -- Ensure no other worker is currently trying to lock it
@@ -441,6 +443,10 @@ impl LockMngr {
441443 }
442444
443445 pub async fn do_cleanup ( & mut self ) -> Result < u64 , sqlx:: Error > {
446+ if self . disable_locking {
447+ return Ok ( 0 ) ;
448+ }
449+
444450 let should_run_cleanup = self
445451 . last_cleanup_at
446452 . map ( |t| {
Original file line number Diff line number Diff line change @@ -373,7 +373,10 @@ async fn query_for_work<'a>(
373373 } ;
374374
375375 if deps_chain_mngr. enabled ( ) && dependence_chain_id. is_none ( ) {
376+ // No dependence chain to lock, so no work to do
377+ health_check. update_db_access ( ) ;
376378 health_check. update_activity ( ) ;
379+ info ! ( target: "tfhe_worker" , "No dcid found to process" ) ;
377380 return Ok ( ( vec ! [ ] , vec ! [ ] ) ) ;
378381 }
379382
You can’t perform that action at this time.
0 commit comments