From dev-return-48498-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Fri Jan 12 01:01:12 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id A557A18076D for ; Fri, 12 Jan 2018 01:01:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 949A4160C41; Fri, 12 Jan 2018 00:01:12 +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 D9C49160C13 for ; Fri, 12 Jan 2018 01:01:11 +0100 (CET) Received: (qmail 49258 invoked by uid 500); 12 Jan 2018 00:01:11 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 49247 invoked by uid 99); 12 Jan 2018 00:01:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jan 2018 00:01:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8C3411808DE for ; Fri, 12 Jan 2018 00:01:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -108.711 X-Spam-Level: X-Spam-Status: No, score=-108.711 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id vQNfbPp1queQ for ; Fri, 12 Jan 2018 00:01:09 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 62A175FE03 for ; Fri, 12 Jan 2018 00:01:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7D687E0383 for ; Fri, 12 Jan 2018 00:01:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A55FA255E0 for ; Fri, 12 Jan 2018 00:01:00 +0000 (UTC) Date: Fri, 12 Jan 2018 00:01:00 +0000 (UTC) From: "Sergey Soldatov (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (PHOENIX-4525) Integer overflow in GroupBy execution 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/PHOENIX-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Soldatov resolved PHOENIX-4525. -------------------------------------- Resolution: Fixed > Integer overflow in GroupBy execution > ------------------------------------- > > Key: PHOENIX-4525 > URL: https://issues.apache.org/jira/browse/PHOENIX-4525 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.13.0 > Reporter: Sergey Soldatov > Assignee: Sergey Soldatov > Attachments: PHOENIX-4525-2.patch, PHOENIX-4525.patch > > > During the execution of group by we adjust memory for the internal cache to keep all unique keys. We're increasing the number of keys by 1.5 factor and calculate how much space we need for it using SizedUtil.sizeOfMap, which is using ints as parameters and returns long. But since we are using all ints during the calculation, the integer overflow may happen and the method would return a negative value. As the result the query would fail, reporting that unable to allocate cache with negative size. -- This message was sent by Atlassian JIRA (v6.4.14#64029)