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 A7AF2200C72 for ; Thu, 27 Apr 2017 13:46:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A6502160B98; Thu, 27 Apr 2017 11:46:10 +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 F0637160BB5 for ; Thu, 27 Apr 2017 13:46:09 +0200 (CEST) Received: (qmail 34399 invoked by uid 500); 27 Apr 2017 11:46:09 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 34258 invoked by uid 99); 27 Apr 2017 11:46:09 -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; Thu, 27 Apr 2017 11:46:09 +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 92582D2D5B for ; Thu, 27 Apr 2017 11:46:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 1jS5_k_YWv00 for ; Thu, 27 Apr 2017 11:46:06 +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 83B835FC62 for ; Thu, 27 Apr 2017 11:46:06 +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 D4FEDE0D85 for ; Thu, 27 Apr 2017 11:46:05 +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 1407121DF2 for ; Thu, 27 Apr 2017 11:46:05 +0000 (UTC) Date: Thu, 27 Apr 2017 11:46:05 +0000 (UTC) From: "Jaromir Vanek (JIRA)" To: dev@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FLINK-6394) GroupCombine reuses instances even though object reuse is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 27 Apr 2017 11:46:10 -0000 Jaromir Vanek created FLINK-6394: ------------------------------------ Summary: GroupCombine reuses instances even though object reuse is disabled Key: FLINK-6394 URL: https://issues.apache.org/jira/browse/FLINK-6394 Project: Flink Issue Type: Bug Affects Versions: 1.2.0 Reporter: Jaromir Vanek Priority: Critical I am using group combiner in DataSet API with disabled object reuse. In code it may be expressed as follows: {code:java} tuples.groupBy(1) .combineGroup((it, collector) -> { // store first item for future use Pojo stored = it.next(); while (it.hasNext()) { .... } }) {code} It seems even the object reuse feature is disabled, my instance is actually replaced when {{.next()}} is called on the iterator. It leads to very confusing and wrong results. I checked the Flink codebase and it seems {{CombiningUnilateralSortMerger}} is actually reusing object instances even though object reuse is explicitly disabled. In spilling phase user's combiner is called with instance of {{CombineValueIterator}} that actually reuses instances without any warning. See https://github.com/apache/flink/blob/d7b59d761601baba6765bb4fc407bcd9fd6a9387/flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/CombiningUnilateralSortMerger.java#L550 When I disable combiner and use {{groupReduce}} only with the same reduce function results are fine. Please let me know if you can confirm this as a bug. From my point it's very critical as I am getting unpredictable results. -- This message was sent by Atlassian JIRA (v6.3.15#6346)