diff --git a/src/box/box.cc b/src/box/box.cc index d43b0dfe792f5b43e88dd1e613613c779b254d8d..6d607c0cd5b28d11d4924c485148d8116b903884 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -502,9 +502,7 @@ box_load_cfg() void box_atfork() { - if (recovery == NULL) - return; - recovery_atfork(recovery); + assert(recovery == NULL); } int diff --git a/src/box/recovery.h b/src/box/recovery.h index a52588ed8fc7092b3cb673b6b7cb555d808295b9..f3799447ca92b17d996837b4aa12f5064f990ca2 100644 --- a/src/box/recovery.h +++ b/src/box/recovery.h @@ -109,9 +109,6 @@ recovery_delete(struct recovery_state *r); void recovery_exit(struct recovery_state *r); -void -recovery_atfork(struct recovery_state *r); - void recovery_update_mode(struct recovery_state *r, enum wal_mode mode); diff --git a/src/box/wal.cc b/src/box/wal.cc index 35dd023a8d62713509d4863d8d26d55780302865..2ecb657aff31f4eaf9ad2ff54fce676f0df8ac7e 100644 --- a/src/box/wal.cc +++ b/src/box/wal.cc @@ -63,29 +63,6 @@ struct wal_writer static struct wal_writer wal_writer; -/** - * A pthread_atfork() callback for a child process. Today we only - * fork the master process to save a snapshot, and in the child - * the WAL writer thread is not necessary and not present. - */ -void -recovery_atfork(struct recovery_state *r) -{ - xlog_atfork(&r->current_wal); - if (r->writer == NULL) - return; - if (r->writer->batch) { - free(r->writer->batch); - r->writer->batch = NULL; - } - /* - * Make sure that atexit() handlers in the child do - * not try to stop the non-existent thread. - * The writer is not used in the child. - */ - r->writer = NULL; -} - /** * A commit watcher callback is invoked whenever there * are requests in wal_writer->commit. This callback is