From notifications-return-1728-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Fri Sep 6 14:37:54 2019 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 B6459180645 for ; Fri, 6 Sep 2019 16:37:53 +0200 (CEST) Received: (qmail 37781 invoked by uid 500); 7 Sep 2019 02:07:14 -0000 Mailing-List: contact notifications-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list notifications@zookeeper.apache.org Received: (qmail 37772 invoked by uid 99); 7 Sep 2019 02:07:14 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Sep 2019 02:07:14 +0000 From: GitBox To: notifications@zookeeper.apache.org Subject: [GitHub] [zookeeper] arshadmohammad commented on a change in pull request #1080: ZOOKEEPER-3496: Transaction larger than jute.maxbuffer makes ZooKeeper service unavailable Message-ID: <156778067304.12823.3143685554500603587.gitbox@gitbox.apache.org> Date: Fri, 06 Sep 2019 14:37:53 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit arshadmohammad commented on a change in pull request #1080: ZOOKEEPER-3496: Transaction larger than jute.maxbuffer makes ZooKeeper service unavailable URL: https://github.com/apache/zookeeper/pull/1080#discussion_r321765848 ########## File path: zookeeper-server/src/test/java/org/apache/zookeeper/JuteMaxBufferTest.java ########## @@ -0,0 +1,146 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper; + +import static org.apache.zookeeper.test.ClientBase.CONNECTION_TIMEOUT; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import org.apache.zookeeper.ZooDefs.Ids; +import org.apache.zookeeper.common.ZKConfig; +import org.apache.zookeeper.server.ZKDatabase; +import org.apache.zookeeper.server.persistence.FileTxnSnapLog; +import org.apache.zookeeper.server.quorum.QuorumPeerTestBase; +import org.apache.zookeeper.test.ClientBase; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class JuteMaxBufferTest extends QuorumPeerTestBase { + private MainThread mt; + + @Before + public void setup() throws Exception { + // Request size for 100 nodes in this test class is 6197 bytes + System.setProperty(ZKConfig.JUTE_MAXBUFFER, Integer.toString(6197)); Review comment: ZKConfig.JUTE_MAXBUFFER is initialized with only one value that is why it was working, anyway I moved initialization to class level so it is initialized only once ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services