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 9448B200D56 for ; Tue, 12 Dec 2017 18:06:15 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 92E50160C23; Tue, 12 Dec 2017 17:06:15 +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 D82F2160C10 for ; Tue, 12 Dec 2017 18:06:14 +0100 (CET) Received: (qmail 97087 invoked by uid 500); 12 Dec 2017 17:06:14 -0000 Mailing-List: contact issues-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 issues@flink.apache.org Received: (qmail 97078 invoked by uid 99); 12 Dec 2017 17:06:14 -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; Tue, 12 Dec 2017 17:06:14 +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 A642618070D for ; Tue, 12 Dec 2017 17:06:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, 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 H9Ogs4O5rhsp for ; Tue, 12 Dec 2017 17:06: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 940AC5FB70 for ; Tue, 12 Dec 2017 17:06:08 +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 17864E25D4 for ; Tue, 12 Dec 2017 17:06:06 +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 AA7DB21307 for ; Tue, 12 Dec 2017 17:06:01 +0000 (UTC) Date: Tue, 12 Dec 2017 17:06:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-8178) Introduce not threadsafe write only BufferBuilder MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 12 Dec 2017 17:06:15 -0000 [ https://issues.apache.org/jira/browse/FLINK-8178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16287895#comment-16287895 ] ASF GitHub Bot commented on FLINK-8178: --------------------------------------- Github user NicoK commented on a diff in the pull request: https://github.com/apache/flink/pull/5105#discussion_r156392377 --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/api/writer/RecordWriterTest.java --- @@ -360,7 +367,7 @@ public void testBroadcastEventMixedRecords() throws Exception { queues[i] = new ArrayDeque<>(); } - BufferProvider bufferProvider = createBufferProvider(bufferSize); + TestPooledBufferProvider bufferProvider = new TestPooledBufferProvider(Integer.MAX_VALUE, bufferSize); --- End diff -- why not also change the `createBufferProvider()` call in line 327 and remove both `createBufferProvider` methods? > Introduce not threadsafe write only BufferBuilder > ------------------------------------------------- > > Key: FLINK-8178 > URL: https://issues.apache.org/jira/browse/FLINK-8178 > Project: Flink > Issue Type: Improvement > Components: Network > Reporter: Piotr Nowojski > Assignee: Piotr Nowojski > Fix For: 1.5.0 > > > While Buffer class is used in multithreaded context it requires synchronisation. Now it is miss-leading/unclear and suggesting that RecordSerializer should take into account synchronisation of the Buffer that's holding. With NotThreadSafe BufferBuilder there would be clear separation between single-threaded writing/creating a BufferBuilder and multithreaded Buffer handling/retaining/recycling. -- This message was sent by Atlassian JIRA (v6.4.14#64029)