File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -2256,21 +2256,22 @@ void SearchWorker::DoBackupUpdateSingleNode(
22562256 } else {
22572257#ifdef FIX_TT
22582258 auto tt_low_node = entry->lock ();
2259- search_->tt_ ->Unpin (node_to_process.hash , entry);
22602259#else
22612260 auto tt_low_node = tt_iter->second .lock ();
22622261#endif
22632262 if (!tt_low_node) {
22642263#ifdef FIX_TT
2265- search_-> tt_ -> Insert (node_to_process. hash ,
2266- std::make_unique<std::weak_ptr<LowNode>>(
2267- node_to_process.tt_low_node ) );
2264+ // An insert would fail, so update the (expired) entry directly.
2265+ *entry = node_to_process. tt_low_node ;
2266+ search_-> tt_ -> Unpin ( node_to_process.hash , entry );
22682267#else
22692268 tt_iter->second = node_to_process.tt_low_node ;
22702269#endif
22712270 node_to_process.node ->SetLowNode (node_to_process.tt_low_node );
22722271 } else {
2273- #ifndef FIX_TT
2272+ #ifdef FIX_TT
2273+ search_->tt_ ->Unpin (node_to_process.hash , entry);
2274+ #else
22742275 assert (!tt_iter->second .expired ());
22752276#endif
22762277 node_to_process.node ->SetLowNode (tt_low_node);
You can’t perform that action at this time.
0 commit comments