@@ -1794,9 +1794,6 @@ func (s *Service) IndexNode(node *storage.Node) error {
17941794 s .indexMu .Lock ()
17951795 err := s .indexNodeLocked (node , false )
17961796 s .indexMu .Unlock ()
1797- if err == nil && ! s .buildInProgress .Load () {
1798- s .scheduleStrategyTransitionCheck ()
1799- }
18001797 return err
18011798}
18021799
@@ -2209,9 +2206,6 @@ func (s *Service) RemoveNode(nodeID storage.NodeID) error {
22092206 s .indexMu .Lock ()
22102207 s .removeNodeLocked (string (nodeID ))
22112208 s .indexMu .Unlock ()
2212- if ! s .buildInProgress .Load () {
2213- s .scheduleStrategyTransitionCheck ()
2214- }
22152209
22162210 return nil
22172211}
@@ -3270,26 +3264,7 @@ func (s *Service) snapshotStrategyInputs() (int, *VectorIndex, *VectorFileStore)
32703264}
32713265
32723266func (s * Service ) scheduleStrategyTransitionCheck () {
3273- if s .buildInProgress .Load () {
3274- return
3275- }
3276- vectorCount , _ , _ := s .snapshotStrategyInputs ()
3277- current := s .currentPipelineStrategy ()
3278- if current == strategyModeUnknown {
3279- return
3280- }
3281- desired := s .desiredRuntimeStrategy (vectorCount )
3282- if desired == current {
3283- return
3284- }
3285- if (current == strategyModeBruteCPU || current == strategyModeBruteGPU ) &&
3286- (desired == strategyModeBruteCPU || desired == strategyModeBruteGPU ) {
3287- if s .switchBruteStrategy (desired ) {
3288- log .Printf ("🔍 Runtime strategy switch: %s -> %s (N=%d)" , current .String (), desired .String (), vectorCount )
3289- }
3290- return
3291- }
3292- s .scheduleDebouncedStrategyTransition (desired )
3267+ return
32933268}
32943269
32953270func (s * Service ) scheduleDebouncedStrategyTransition (target strategyMode ) {
0 commit comments