From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 39C566C7D7; Mon, 26 Apr 2021 13:13:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 39C566C7D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1619432013; bh=28No+Uw/vVgZvhCCKhbmbIwbh5tyxYRdMPmNY4iW/vk=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=bIjbbpI97GuVcaR5zvsFL7L4QCAnBXXR9Fzdk2pnTfKk6+1q5vN0/jRZy562Q1naD tWpOlWUXR38+oFROaO+SHe2PYccyKBvmErcxa5caDb5qEjzgctTLAtYp9k0McOwptX W07UceHcOmrCSdUuy+ZN2xmt7CEEBOh7cnGAC8ho= Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 5C4A06FC8E for ; Mon, 26 Apr 2021 13:13:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5C4A06FC8E Received: by mail-lf1-f52.google.com with SMTP id 12so87173783lfq.13 for ; Mon, 26 Apr 2021 03:13:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=O9Tl1ukWkIsaqOY/TabSZryvRajWUXlAgJGbgLlzr28=; b=kEKYe0gx0KJTACGawv4b3zLc8yiHtGiOyZx6am7OIdXYSEiHLA1+IleXiulEs+FJzZ x5/GF7olsEAnjxyZXrYppK5FHc89EkUiiHwrYZIHxf8dyZ0mRRmDYQMXjWOaFySkwlkr z19oc66xT4bsW5oRqlBaU0oGcPlQ4yr1CssfckbkIPbCPoqbjZTLufscgzi088njsd5J SantIUmyC2S87J/YryDYYFUTPjhVjn14tjDgr0FmIKYuWcB6M1b/kwFI8KKfHj6Yu/A2 aXyCge8G2uXHzWSlIgLCqo1Gj8U+8z3EjHgOJ1CWEN2hKvYf1qGHTqql4XJ08DrGEspJ WKoQ== X-Gm-Message-State: AOAM5319FknoKCjNc1U8/0n8QnlFJXnAG2ugz0NdOBj+QCJUAbfzJoMU coeMIirZBDWlyS4HjBrpTpUzqLgDNfg= X-Google-Smtp-Source: ABdhPJx9tZrDIVZvW/v/WxIpZ42uW5yplB0r+S8hA3L0Y2K9gZsH5AONTS3w0wxQ1mXKfVoF5yoShw== X-Received: by 2002:a05:6512:2309:: with SMTP id o9mr12660489lfu.168.1619432011302; Mon, 26 Apr 2021 03:13:31 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id c5sm1364681lfk.141.2021.04.26.03.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 03:13:30 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id CCC035601F3; Mon, 26 Apr 2021 13:13:29 +0300 (MSK) Date: Mon, 26 Apr 2021 13:13:29 +0300 To: Vladislav Shpilevoy Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) Subject: Re: [Tarantool-patches] [PATCH v2 1/1] txn: destroy commit and rollback triggers X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Sun, Apr 25, 2021 at 05:42:35PM +0200, Vladislav Shpilevoy wrote: > static int > txn_add_redo(struct txn *txn, struct txn_stmt *stmt, struct request *request) > { > @@ -149,8 +146,11 @@ txn_rollback_one_stmt(struct txn *txn, struct txn_stmt *stmt) > { > if (txn->engine != NULL && stmt->space != NULL) > engine_rollback_statement(txn->engine, txn, stmt); > - if (stmt->has_triggers) > - txn_run_rollback_triggers(txn, &stmt->on_rollback); > + if (stmt->has_triggers && trigger_run(&stmt->on_rollback, txn) != 0) { > + diag_log(); > + unreachable(); > + panic("statement rollback trigger failed"); > + } > } Good catch, Vlad! Can we please eliminate these unreachable() calls while you're modifying it? It is simply not needed (because it is rather a hint for compiler and in case if the code is executing it leads to unpredicted results so panic() is only right thing to do).