Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: v.shpilevoy@tarantool.org, kostja@tarantool.org,
	Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] [PATCH 1/2] Do not log error in engine_find()
Date: Mon, 19 Aug 2019 17:49:33 +0300	[thread overview]
Message-ID: <bbc91caf081c25bcb05b9be0bb662b07c367d353.1566223966.git.korablev@tarantool.org> (raw)
In-Reply-To: <cover.1566223966.git.korablev@tarantool.org>
In-Reply-To: <cover.1566223966.git.korablev@tarantool.org>

Error logging in engine_find() seems to be redundant: error message is
displayed twice (since its callers always push error on the top).  Let's
remove this duplication.
---
 src/box/engine.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/box/engine.h b/src/box/engine.h
index a302b3bca..ef694da00 100644
--- a/src/box/engine.h
+++ b/src/box/engine.h
@@ -235,10 +235,8 @@ static inline struct engine *
 engine_find(const char *name)
 {
 	struct engine *engine = engine_by_name(name);
-	if (engine == NULL) {
+	if (engine == NULL)
 		diag_set(ClientError, ER_NO_SUCH_ENGINE, name);
-		diag_log();
-	}
 	return engine;
 }
 
-- 
2.15.1

  reply	other threads:[~2019-08-19 14:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 14:49 [tarantool-patches] [PATCH 0/2] Introduce WITH ENGINE option for CREATE TABLE stmt Nikita Pettik
2019-08-19 14:49 ` Nikita Pettik [this message]
2019-08-19 14:49 ` [tarantool-patches] [PATCH 2/2] sql: allow to specify engine in " Nikita Pettik
2019-08-20 11:59   ` [tarantool-patches] " Konstantin Osipov
2019-08-19 21:05 ` [tarantool-patches] Re: [PATCH 0/2] Introduce WITH ENGINE option for " Vladislav Shpilevoy
2019-08-20 11:57 ` Konstantin Osipov
2019-08-20 12:10   ` n.pettik
2019-08-20 13:49     ` Konstantin Osipov
2019-08-20 13:56       ` n.pettik
2019-08-20 13:59         ` Konstantin Osipov
2019-08-22 12:07 ` Kirill Yukhin

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=bbc91caf081c25bcb05b9be0bb662b07c367d353.1566223966.git.korablev@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [tarantool-patches] [PATCH 1/2] Do not log error in engine_find()' \
    /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