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 B5D02804FD; Fri, 28 Oct 2022 09:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1666950206; bh=uvjlghwmAtjZ/SAAIyyvZh5JygI9mw375Q9heCX0AEY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XGyB3kJqnJbi35zzss8WiMC48YcXJweCGVG3jyl7VB9fPd6Bt4cu5CHupYQm1a6E3 rQgDJ5nnoTn7ElhFIUCcauMNu9sdS+w/c54Ftlh8S5GJw3JiTCiMQJwNZbfrzEJKW7 eGeIAEn4mFGG+YLc2nrC0Hq+3xUADN/gMuR7vGltabZKCdm4idGGQSUjtsYHxvPu10 Q+HOpydP4B1kwxjT1rFJO/WXSWh4HEdVs3CIjKi72L5NnbF0hKQBKek9FWAqbIRVKq vJVfbYixEKgnRXxbcLjfY389IthmF8wD70RyJJDE49GApz/0dHRuRIp3cW9xfbcAJ0 3lgAK/QIhki5A== Message-ID: <3a79a587-ddee-9e25-2ac5-b573938b44a9@gnuweeb.org> Date: Fri, 28 Oct 2022 16:43:13 +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> <1d500d37-b11b-75fd-38e5-d7f8e0a9b1d4@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:40 PM, Alviro Iskandar Setiawan wrote: > On Fri, Oct 28, 2022 at 4:32 PM Ammar Faizi wrote: >> 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. > > Turning on autocommit for everything is usually a hint that you did > ACID wrong, maybe not you, but Rizki. Maybe, that's why I said "I doubt". But I don't have time to review it for now, will do that later. -- Ammar Faizi