Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [Tarantool-patches] [PATCH 4/5] journal: drop unused destroy method
Date: Fri, 26 Jun 2020 17:52:26 +0300	[thread overview]
Message-ID: <20200626145227.1507426-5-gorcunov@gmail.com> (raw)
In-Reply-To: <20200626145227.1507426-1-gorcunov@gmail.com>

We never use this method so no need to waste space.

In-scope-of #4842

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 src/box/box.cc    | 3 +--
 src/box/journal.h | 9 +--------
 src/box/wal.c     | 3 +--
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/box/box.cc b/src/box/box.cc
index dfd7dcb5a..ad76f4f00 100644
--- a/src/box/box.cc
+++ b/src/box/box.cc
@@ -364,8 +364,7 @@ recovery_journal_create(struct vclock *v)
 {
 	static struct recovery_journal journal;
 	journal_create(&journal.base, recovery_journal_write_async,
-		       txn_complete_async,
-		       recovery_journal_write, NULL);
+		       txn_complete_async, recovery_journal_write);
 	journal.vclock = v;
 	journal_set(&journal.base);
 }
diff --git a/src/box/journal.h b/src/box/journal.h
index a3f3170ed..ebc5cb708 100644
--- a/src/box/journal.h
+++ b/src/box/journal.h
@@ -102,9 +102,6 @@ struct journal {
 	/** Synchronous write */
 	int (*write)(struct journal *journal,
 		     struct journal_entry *entry);
-
-	/** Journal destroy */
-	void (*destroy)(struct journal *journal);
 };
 
 /**
@@ -169,8 +166,6 @@ journal_write_async(struct journal_entry *entry)
 static inline void
 journal_set(struct journal *new_journal)
 {
-	if (current_journal && current_journal->destroy)
-		current_journal->destroy(current_journal);
 	current_journal = new_journal;
 }
 
@@ -180,13 +175,11 @@ journal_create(struct journal *journal,
 				  struct journal_entry *entry),
 	       void (*write_async_cb)(struct journal_entry *entry),
 	       int (*write)(struct journal *journal,
-			    struct journal_entry *entry),
-	       void (*destroy)(struct journal *journal))
+			    struct journal_entry *entry))
 {
 	journal->write_async	= write_async;
 	journal->write_async_cb	= write_async_cb;
 	journal->write		= write;
-	journal->destroy	= destroy;
 }
 
 /**
diff --git a/src/box/wal.c b/src/box/wal.c
index b979244e3..74cc74684 100644
--- a/src/box/wal.c
+++ b/src/box/wal.c
@@ -417,8 +417,7 @@ wal_writer_create(struct wal_writer *writer, enum wal_mode wal_mode,
 		       wal_write_none_async : wal_write_async,
 		       wall_async_cb,
 		       wal_mode == WAL_NONE ?
-		       wal_write_none : wal_write,
-		       NULL);
+		       wal_write_none : wal_write);
 
 	struct xlog_opts opts = xlog_opts_default;
 	opts.sync_is_async = true;
-- 
2.26.2

  parent reply	other threads:[~2020-06-26 14:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 14:52 [Tarantool-patches] [PATCH 0/5] qsync: Cleanups during review Cyrill Gorcunov
2020-06-26 14:52 ` [Tarantool-patches] [PATCH 1/5] iproto: drop unused iproto_type_is_sync Cyrill Gorcunov
2020-06-26 14:52 ` [Tarantool-patches] [PATCH 2/5] iproto: drop unused iproto_type_is_select Cyrill Gorcunov
2020-06-26 14:52 ` [Tarantool-patches] [PATCH 3/5] iproto: drop unused iproto_type_is_request Cyrill Gorcunov
2020-06-26 14:52 ` Cyrill Gorcunov [this message]
2020-06-26 14:52 ` [Tarantool-patches] [PATCH 5/5] txn: use txn_set_flag Cyrill Gorcunov
2020-06-26 14:55 ` [Tarantool-patches] [PATCH 0/5] qsync: Cleanups during review Cyrill Gorcunov
2020-06-28 16:55 ` Vladislav Shpilevoy
2020-06-29 20:37 ` Vladislav Shpilevoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200626145227.1507426-5-gorcunov@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 4/5] journal: drop unused destroy method' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox