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 CAF442BADA for ; Wed, 24 Apr 2019 14:28:14 -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 scneZSjeetxc for ; Wed, 24 Apr 2019 14:28:14 -0400 (EDT) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 7D3942BA90 for ; Wed, 24 Apr 2019 14:28:14 -0400 (EDT) Received: by mail-lj1-f196.google.com with SMTP id h16so5280543ljg.11 for ; Wed, 24 Apr 2019 11:28:14 -0700 (PDT) Date: Wed, 24 Apr 2019 21:28:11 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 03/10] Encode a dml statement to a transaction memory region Message-ID: <20190424182811.GC21344@atlas> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: tarantool-patches@freelists.org Cc: Georgy Kirichenko * Georgy Kirichenko [19/04/19 19:59]: > Prerequisites: #1254 > --- > src/box/request.c | 2 +- > src/box/txn.c | 2 +- > src/box/vy_log.c | 2 +- > src/box/vy_stmt.c | 6 ++++-- > src/box/xrow.c | 21 +++++++++++++++------ > src/box/xrow.h | 12 +++++++++--- > 6 files changed, 31 insertions(+), 14 deletions(-) > > diff --git a/src/box/request.c b/src/box/request.c > index 9c684af73..9edd1f8b1 100644 > --- a/src/box/request.c > +++ b/src/box/request.c > @@ -61,7 +61,7 @@ request_update_header(struct request *request, struct xrow_header *row) > if (row == NULL) > return 0; > row->type = request->type; > - row->bodycnt = xrow_encode_dml(request, row->body); > + row->bodycnt = xrow_encode_dml(request, &fiber()->gc, false, row->body); I don't understand the business with copy_tuple. Why do you need it? Why not always copy the tuple? Why not have a separate wrapper which would copy the body, e.g. xrow_encode_dml_and_copy_body()? request_update_header() should be using txn memory, I don't see why it uses region memory in your patch. I haven't seen the subsequent patches, I hope it is addressed there. If not, please do. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov