mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-15 17:51:06 +00:00
fix: macos segfault loading snapshot (#1931)
This commit is contained in:
parent
00ee506cc8
commit
d9f4ca8003
1 changed files with 6 additions and 1 deletions
|
@ -250,7 +250,12 @@ bool IsReplicatingNoOne(string_view host, string_view port) {
|
|||
}
|
||||
|
||||
void RebuildAllSearchIndices(Service* service) {
|
||||
boost::intrusive_ptr<Transaction> trans{new Transaction{service->FindCmd("FT.CREATE")}};
|
||||
const CommandId* cmd = service->FindCmd("FT.CREATE");
|
||||
if (cmd == nullptr) {
|
||||
// On MacOS we don't include search so FT.CREATE won't exist.
|
||||
return;
|
||||
}
|
||||
boost::intrusive_ptr<Transaction> trans{new Transaction{cmd}};
|
||||
trans->InitByArgs(0, {});
|
||||
trans->ScheduleSingleHop([](auto* trans, auto* es) {
|
||||
es->search_indices()->RebuildAllIndices(trans->GetOpArgs(es));
|
||||
|
|
Loading…
Reference in a new issue