From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id F35D52AC31 for ; Tue, 28 May 2019 07:12:23 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nx2JhzGi23Di for ; Tue, 28 May 2019 07:12:23 -0400 (EDT) Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 479FB2A297 for ; Tue, 28 May 2019 07:12:23 -0400 (EDT) Date: Tue, 28 May 2019 14:12:19 +0300 From: Mergen Imeev Subject: [tarantool-patches] Re: [PATCH v1 00/21] sql: remove SQL error system. Message-ID: <20190528111219.GA2533@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: "n.pettik" Cc: tarantool-patches@freelists.org On Sat, May 25, 2019 at 07:36:02PM +0300, n.pettik wrote: > I’ve pushed couple of follow-ups: > https://github.com/tarantool/tarantool/tree/np/gh-4074-follow-ups > > Check them out please. > Before I cherry-picked your patch, I made some changes to the "sql: disable lookaside system" patch and resolved the conflicts that appeared during the cherry-pick. Diff for patch "sql: disable lookaside system": diff --git a/src/box/sql/malloc.c b/src/box/sql/malloc.c index 5c9c8d5..a7549db 100644 --- a/src/box/sql/malloc.c +++ b/src/box/sql/malloc.c @@ -681,35 +681,9 @@ sqlDbMallocRaw(sql * db, u64 n) void * sqlDbMallocRawNN(sql * db, u64 n) { -#ifndef SQL_OMIT_LOOKASIDE - LookasideSlot *pBuf; - assert(db != 0); - assert(db->pnBytesFreed == 0); - if (db->lookaside.bDisable == 0) { - assert(db->mallocFailed == 0); - if (n > db->lookaside.sz) { - db->lookaside.anStat[1]++; - } else if ((pBuf = db->lookaside.pFree) == 0) { - db->lookaside.anStat[2]++; - } else { - db->lookaside.pFree = pBuf->pNext; - db->lookaside.nOut++; - db->lookaside.anStat[0]++; - if (db->lookaside.nOut > db->lookaside.mxOut) { - db->lookaside.mxOut = db->lookaside.nOut; - } - return (void *)pBuf; - } - } else if (db->mallocFailed) { - return 0; - } -#else - assert(db != 0); - assert(db->pnBytesFreed == 0); - if (db->mallocFailed) { - return 0; - } -#endif + assert(db != NULL && db->pnBytesFreed == NULL); + if (db->mallocFailed) + return NULL; return dbMallocRawFinish(db, n); }