From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.88.254] (unknown [125.163.238.123]) by gnuweeb.org (Postfix) with ESMTPSA id 075E4804FD; Fri, 28 Oct 2022 09:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1666949574; bh=0lLz0zpKuhNQpOPPu2/OoUWRbN7mZ30Rue1Qx9kqQP0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BFVd9LDOOdIBWv0ph5+VdRZKb59CsRayQjcGyfKGKaI20udsYE0oC+Mn1JOKXfSc8 hS0OepzDoFGfij52EM+SCOjGF5J51jcH61O58gD+Q0Ad6GSR4Jv7OKK/rE9mA5lpu9 /xY3cAonnpOENV43YuexmGs5KYbEHTTP8Vy2s6WwnZ8TMXJr+mPLHv+j4fJEC3hP5+ M85nqob6hhASSp15ZEDR3TjynkwJ0qXErnnQtNT9PXJtJDA62wp48IgrbnzNzUej14 vVhalLrV6yQVrUMmIdgX31lxfLnCDmUp1rgp98KpR3IUhZWgOQrIk5GvygpLZDArAS VfSeOm+84Z7rA== Message-ID: <1d500d37-b11b-75fd-38e5-d7f8e0a9b1d4@gnuweeb.org> Date: Fri, 28 Oct 2022 16:32:41 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v1 2/2] daemon: telegram: Handle MySQL error Content-Language: en-US To: Alviro Iskandar Setiawan Cc: GNU/Weeb Mailing List , Muhammad Rizki References: <20221027150823.601914-1-ammarfaizi2@gnuweeb.org> <20221027150823.601914-3-ammarfaizi2@gnuweeb.org> From: Ammar Faizi In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 10/28/22 4:24 PM, Alviro Iskandar Setiawan wrote: > I think this reconnect() handling should be done in each DB method, > not here, otherwise we'll potentially have a half-inserted data and > may get it wrong. By using a transaction, such a situation cannot happen. It already fulfills the ACID requirements. But I doubt we've fully handled that properly. This needs extra code review, especially in that critical section. -- Ammar Faizi