From user-return-63742-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Fri Apr 26 19:05:14 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5733118064C for ; Fri, 26 Apr 2019 21:05:14 +0200 (CEST) Received: (qmail 21657 invoked by uid 500); 26 Apr 2019 19:05:10 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 21647 invoked by uid 99); 26 Apr 2019 19:05:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Apr 2019 19:05:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 22AE7C61E5 for ; Fri, 26 Apr 2019 19:05:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.261 X-Spam-Level: ** X-Spam-Status: No, score=2.261 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HK_RANDOM_ENVFROM=0.626, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.164, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id VRpV2CTPZP40 for ; Fri, 26 Apr 2019 19:05:08 +0000 (UTC) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 1350B5F4D0 for ; Fri, 26 Apr 2019 19:05:08 +0000 (UTC) Received: by mail-ed1-f48.google.com with SMTP id a6so4063373edv.1 for ; Fri, 26 Apr 2019 12:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=XWRZdT0mXlYbyl3sbb9EDmHT7/EGSFpwaYU8S26p0zc=; b=qFpVYNHJ1xAhl/j0WJTIyZyU1MwD0TImzX8vzCtWxYl0fB9uDykrcA9kpdb+GwOe/2 16vYYvfl2U8UjbvXB35v85rZbAp/sF+AtNXDQQ0fRI12a3hAl475bteKThQmVzSbzau/ Tc/FljiKOwr2OMRIywUOTzjehbo1/SLass/0gj83pptGIchZiDqRDjr0kvMatoNH4Nkz kqSYUJ5Cv5lCRVrr8D3gnf5edLyo5TAot8UQiDv5Xd0HJU9hEyk/nQL/UqwvCMBEnNkD UNcGIeJL6h/FvaRg1FtvGEvqwXuGG3A8CpabzugLx9gx0+KbCOCZC4s3kf06YAyHLcAG 8Wgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=XWRZdT0mXlYbyl3sbb9EDmHT7/EGSFpwaYU8S26p0zc=; b=nQhcI/AaQKLUcVZ5odtJiuTvkkgOzUWO40nqsp+wONEwlRVzgYYiO1M9lUrwayJ012 E5sJn82MadKDgCXSIztSR8kih//9H2CPE/TuLc/ulMW47OTa5GrvWJE5cDHfmcmoJ+0u WJfdofTAYpDI+NYDjt6lW02AhKoYjszDK+J496/ZN0Y7iRLYFusHkYpRF4ZuTlJfFX2b 7fTOyEQeT/f0dlKZeFHPyt+Ubg04/p6yhLi2H3hrekAcC/6ZoV2fZOXqShZw+jDHa7sm kp5JS9LcSnZrr5JHcufUZJSqU1I7VEYsAAW0I78PXdyqwsNN9ekfzXMpxAv/BtPEIwnh GoRQ== X-Gm-Message-State: APjAAAXUplS5cCAZ0O53OVWu4kZP+ohoE/IYcqVCpDO/JqzyQ/9lhnoc pUHSie0sjkWJL8mx4IIEIrriOF52pWa5fVADu70Qtj9qt1E= X-Google-Smtp-Source: APXvYqy9oLtV11nEGGEdfqDp8XoTCV08moEqAxS8Lkx6kOyvJ9NzJlEiIJUjDd1CesArjL8+BPG+P63PhT2WyCsaRbA= X-Received: by 2002:a50:be01:: with SMTP id a1mr29652932edi.12.1556305507469; Fri, 26 Apr 2019 12:05:07 -0700 (PDT) MIME-Version: 1.0 References: <5cbf234c.1c69fb81.9a97a.6a72@mx.google.com> In-Reply-To: <5cbf234c.1c69fb81.9a97a.6a72@mx.google.com> From: Long Quanzheng Date: Fri, 26 Apr 2019 12:04:56 -0700 Message-ID: Subject: Error returned that means unknown To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary="000000000000ef4e350587739c0d" --000000000000ef4e350587739c0d Content-Type: text/plain; charset="UTF-8" Hi We found that Cassandra can return timeout error but the actual operation succeeded. https://github.com/gocql/gocql/blob/master/conn.go#L1441 Is there a way to know all those kind of errors? Here is the background why we need this: We are using two phase commit: 1) append data to tableA 2) execute LWT on tableB 3) So if 2) fails we need to clean up the data written into tableA. Otherwise we lost data. Previously we always clean up in 3) if we got any error from 2), which is wrong for ErrorTimeoutNoReponse. This error simply means the result is unknown. So we should whitelist this error. But we don't know what are the other errors that should also be whitelisted. *Alternative:* What we can also do is instead of whitelisting, we do backlisting. We only clean up in 3) for certain error that we know that 2) doesn't succeed. But from the gocql code, I don't know how to find all of them. If we don't clean up correctly in those case, we may leak some data that will never be deleted. Thanks --000000000000ef4e350587739c0d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0

We found that Cassa= ndra can return timeout error but the actual operation succeeded.=C2=A0
Is there a way to know all those kind of errors?
=
Here is the background why we need this:
We are us= ing two phase commit:
1) append data to tableA
2) execu= te LWT on tableB
3) So if 2) fails we need to clean up the data w= ritten into tableA. Otherwise we lost data.

Previo= usly we always clean up=C2=A0 in 3) if we got any error from 2), which is w= rong for ErrorTimeoutNoReponse. This error simply means the result is unkno= wn. So we should whitelist this error. But we don't know what are the o= ther errors that should also be whitelisted.

Al= ternative:
What we can also do is instead of whitelisting, we= do backlisting. We only clean up in 3) for certain error that we know that= 2) doesn't succeed. But from the gocql code, I don't know how to f= ind all of them. If we don't clean up correctly in those case, we may l= eak some data that will never be deleted.

Thanks
--000000000000ef4e350587739c0d--