Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E38AB200C54 for ; Wed, 12 Apr 2017 17:48:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E0818160B95; Wed, 12 Apr 2017 15:48:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 32BDA160B8A for ; Wed, 12 Apr 2017 17:48:03 +0200 (CEST) Received: (qmail 76519 invoked by uid 500); 12 Apr 2017 15:48:02 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 76493 invoked by uid 99); 12 Apr 2017 15:48:02 -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; Wed, 12 Apr 2017 15:48:02 +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 AD0C5CF985 for ; Wed, 12 Apr 2017 15:48:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.397 X-Spam-Level: X-Spam-Status: No, score=-0.397 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, 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 pSsnwIkogA4Y for ; Wed, 12 Apr 2017 15:47:59 +0000 (UTC) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E3A625FC5D for ; Wed, 12 Apr 2017 15:47:53 +0000 (UTC) Received: by mail-io0-f173.google.com with SMTP id l7so45531827ioe.3 for ; Wed, 12 Apr 2017 08:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0Xq5x59rRcygkgIX2C4O+i4jC87n80aZVjuWOMqoNfM=; b=ryoF+3Qn4tm9AqsLj/fWyf2ibBL291BZs7Gez4ugAZZCL9VirAqoc4EpqcJXF5TT5r TCLK1wYMdra5fd6e2rtUu7+9Ki+RcskZCq5f7yOcY6WktDkFikehmBprOMi4yWqFTqR6 WIF0FSvDGlUnFFolLSzs0ReQnF6tPw41KeiLMCMbsBT8XAJfquMzHSzQSX/jogGVrAkm dGKas2q4+x4d1DbboKMV9l585Dw4lObMZE10kkeUEaymHxOgojmjjQ9Vgh1hzEV1qWcd w4zh7JV2+2Z14ft7VnwA7KF6ATOJ772LzGTGDrqdwyZK+MDECr45QdCWvzjI+3ZRH23a rtZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0Xq5x59rRcygkgIX2C4O+i4jC87n80aZVjuWOMqoNfM=; b=g+zR5LY5w5e3BNVmwScWX2KAwDlQ7coFxEGtLhrzDrzFfsXLVdd/fGWpLqq+09dmO7 1+k6X8NCUXiHspvAZSCHDweFzuzrRgjwHQH1QkbIbCz90oYZ56lKVkcexXcpmf/wocD9 aRF9G2xjpa7zzYMl6jqeY1GsX5sacAhVCeHA0mfklROBQKFdjfyW+X4MR4nRV9BTG94R u7m39HUbPh6oXD4Duu9XL/pKrzr3HYigFxb3UiFPZtK/aKcHk2Qd2c89ySr96pml8w56 0TldhxDogi6+4vJkieBvST5lL/Y0VQEba+UFXyljnXSMno+MFFFK5p+vYZ7DhVjN6x4b mD3g== X-Gm-Message-State: AN3rC/5jZuS4FCD7KYXFsrezQ9aFuAwupXIt/w1qth+Y+Aoa2eX6ma6lnQFRGxB+hCqdJYg9FcJwJhxtoMpsjg== X-Received: by 10.36.175.28 with SMTP id t28mr18674470ite.119.1492012066354; Wed, 12 Apr 2017 08:47:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.183.199 with HTTP; Wed, 12 Apr 2017 08:47:45 -0700 (PDT) Received: by 10.107.183.199 with HTTP; Wed, 12 Apr 2017 08:47:45 -0700 (PDT) In-Reply-To: References: From: Igor Rudyak Date: Wed, 12 Apr 2017 08:47:45 -0700 Message-ID: Subject: Re: Session expiration in Cassandra store To: Valentin Kulichenko Cc: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=f403045da082373d92054cfa21df archived-at: Wed, 12 Apr 2017 15:48:04 -0000 --f403045da082373d92054cfa21df Content-Type: text/plain; charset=UTF-8 Hi Val, 1) The genral idea is to have a session pool, cause closing and reopening Cassandra session each time is rather expensive operation. 2) I can easily add session expiration timeout as a parameter for Cassandra store. Will create a ticket for this. 3) It could be easily implemented ether, by closing and reopening session every time or just keeping opened sessions forever, but both approaches are bad. It's better to have a session pool and specify rather long session expiration timeout. Igor On Apr 12, 2017 2:48 AM, "Valentin Kulichenko" < valentin.kulichenko@gmail.com> wrote: Hi Igor, I recently faced an issue with Cassandra store closing idle connections after some time. While investigating I found that this is caused by SessionPool and its SessionMonitor thread which closes sessions that were not acquired from the pool within 5 minutes. I have several questions regarding this: - What is the general idea behind this? - Why the timeout is not configurable? - Is it possible to add an option to disable this thread completely? Will this have any drawbacks? -Val --f403045da082373d92054cfa21df--