From dev-return-58715-archive-asf-public=cust-asf.ponee.io@thrift.apache.org Sun Jun 7 21:23:03 2020 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 E4544180663 for ; Sun, 7 Jun 2020 23:23:02 +0200 (CEST) Received: (qmail 47809 invoked by uid 500); 7 Jun 2020 21:23:01 -0000 Mailing-List: contact dev-help@thrift.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@thrift.apache.org Delivered-To: mailing list dev@thrift.apache.org Received: (qmail 47774 invoked by uid 99); 7 Jun 2020 21:23:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jun 2020 21:23:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0429F41203 for ; Sun, 7 Jun 2020 21:23:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 77BF8780579 for ; Sun, 7 Jun 2020 21:23:00 +0000 (UTC) Date: Sun, 7 Jun 2020 21:23:00 +0000 (UTC) From: "Yuxuan Wang (Jira)" To: dev@thrift.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (THRIFT-5214) go: Implement connection check in TSocket MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/THRIFT-5214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17127768#comment-17127768 ] Yuxuan Wang commented on THRIFT-5214: ------------------------------------- OK I figured it out. It was actually a bug in the original implementation of socketConn. Fixed in https://github.com/apache/thrift/pull/2172 > go: Implement connection check in TSocket > ----------------------------------------- > > Key: THRIFT-5214 > URL: https://issues.apache.org/jira/browse/THRIFT-5214 > Project: Thrift > Issue Type: Improvement > Components: Go - Library > Reporter: Yuxuan Wang > Priority: Major > Fix For: 0.14.0 > > Time Spent: 1h > Remaining Estimate: 0h > > The first issue described in [this GitHub engineering blog article|https://github.blog/2020-05-20-three-bugs-in-the-go-mysql-driver/] is also an issue when we use thrift client pools. We implemented a thrift client pool by checking client's TTransport.IsOpen before using that client, and also added (arbitrary) TTL to the clients to avoid using clients that's been opened for too long, but we still occasionally get broken pipes and unexpected EOF errors when using those clients. I think implementing the same connection check described by that article in TSocket.IsOpen (and/or when try to read 0 byte from TSocket.Read) would greatly help the situation. > But there are a few limitations of the connection check implementation, and I'm not sure how acceptable are they in the thrift library: > 1. It only works on non-windows systems (so for windows we'll have to fallback to the old IsOpen implementation, I guess?) > 2. It requires go 1.9+, what's thrift library's minimal go version supported? -- This message was sent by Atlassian Jira (v8.3.4#803005)