From dev-return-31712-archive-asf-public=cust-asf.ponee.io@geode.apache.org Fri Aug 23 16:54:50 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 1D279180637 for ; Fri, 23 Aug 2019 18:54:50 +0200 (CEST) Received: (qmail 89448 invoked by uid 500); 23 Aug 2019 16:54:49 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 89437 invoked by uid 99); 23 Aug 2019 16:54:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Aug 2019 16:54:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C7902C1D07 for ; Fri, 23 Aug 2019 16:54:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id oF-Mga8b8OYm for ; Fri, 23 Aug 2019 16:54:44 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=148.163.150.38; helo=mx0a-00296801.pphosted.com; envelope-from=bschuchardt@pivotal.io; receiver= Received: from mx0a-00296801.pphosted.com (mx0a-00296801.pphosted.com [148.163.150.38]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 2975DBDEA4 for ; Fri, 23 Aug 2019 16:54:43 +0000 (UTC) Received: from pps.filterd (m0114583.ppops.net [127.0.0.1]) by mx0a-00296801.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7NGksvl017014 for ; Fri, 23 Aug 2019 16:54:43 GMT Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-00296801.pphosted.com with ESMTP id 2uhacvj4k3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 23 Aug 2019 16:54:42 +0000 Received: by mail-pf1-f198.google.com with SMTP id e18so6874194pfj.7 for ; Fri, 23 Aug 2019 09:54:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=eBSt0wg7R/k5o5l/vXfu3Q6gwfI0ngQ5mz4XBYs/Zxc=; b=YhzxFr+paLA25ZeTGSd+ptJ9kr9AMmuImFbfo5iOE1cMPJt7F8dWMKhvSm7VOM/3JN yMENqnKiKYucK395JTDqgOkZXNuK632Ddey+ESLJclAqgDEu4bNDFtjPvyn1uOuRy5ap BxJl+LaWkznE76iVIVMnsyiBjtNxPa6m3kfD+hm9gilfMFPnUbSQMR5bWUAhz4E46kPD cFXlOb7bmAiTU88mxnyQ/H9RyMZibni2DXEpHMRBp9eTvRRD2QgnP7bzn2TE7/DVtScl kOyDTC04I2rwInID7AON3Hl8Y5EvbQ1SE2Cs2QrfUIlgMVNulw0Iq9Ch4t/qdwYx9pCz Eo9w== X-Gm-Message-State: APjAAAVjvxehf3fxbNfucggPrSl+53+8GUV180nANhPg/S5o6m3rliXv AKvtMq7rpok+N966QGuN6Wm9lGC+aDQbuYlJ73Jperras7ME3m/Qyo6nDAf74ZaNqdBCJOaIf9L 8iWcm9DsNUKBx59jFVXyTLq3O33wD91u/9KOXKQ== X-Received: by 2002:a63:7a01:: with SMTP id v1mr4973829pgc.310.1566579281916; Fri, 23 Aug 2019 09:54:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9FOnRVVnHGjZT95Fvktdz3WRCsVJhtnUvAsB4PMifw3cp1rF0vxmA5hyfhPMpIWsulh8AlQ== X-Received: by 2002:a63:7a01:: with SMTP id v1mr4973804pgc.310.1566579281401; Fri, 23 Aug 2019 09:54:41 -0700 (PDT) Received: from [10.118.33.200] (50-203-225-134-static.hfc.comcastbusiness.net. [50.203.225.134]) by smtp.gmail.com with ESMTPSA id s125sm7850183pfc.133.2019.08.23.09.54.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Aug 2019 09:54:40 -0700 (PDT) Subject: Re: [DISCUSS] Version 1.11 serialization ordinal is wrong To: dev@geode.apache.org References: <06266d83-9799-9bf1-29ad-9c409ea27965@pivotal.io> From: Bruce Schuchardt Message-ID: <1b2be9c2-bc67-241c-b1ea-8272e0ac1987@pivotal.io> Date: Fri, 23 Aug 2019 09:54:40 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-23_07:2019-08-21,2019-08-23 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 suspectscore=1 adultscore=0 impostorscore=0 phishscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1908230163 Yeah, that code is confusing.  I think the ordinal constants should all be changed to shorts and the constructor for Version should take a short as well.  I can see why someone creating a new ordinal would be hesitant to do that - it will need to be tested. The on-wire representation of a Version isn't limited to a byte. We use writeOrdinal() to serialize version ordinals. I'll open a JIRA to address this. On 8/23/19 9:16 AM, Kirk Lund wrote: > I think they did that because the datatypes in the Version class are too > small. I'm not sure why bytes and shorts were chosen. > > The version constants are defined as bytes: > > private static final *byte* GEODE_1_11_0_ORDINAL = 107; > > While the ordinal is defined as a short: > > private final *short* ordinal; > > I'm assuming this was done because Version ends up on the wire. Does it go > into every message or just handshake/join messages? I suppose we can't > change these datatypes to integers until Geode 2.0 because they would end > up being a breaking change. > > Maybe we should scan through all serialized datatypes for bytes/shorts that > are going to run out... > > On Fri, Aug 23, 2019 at 9:02 AM Bruce Schuchardt > wrote: > >> We've been incrementing the serialization version by 5 for each x.x.0 >> release but I see that we went from 105 in 1.10.0 to 107 in develop for >> 1.11.0. That gives us only one opportunity to make a serialization >> change if we need to release patches for 1.10. I don't think that's >> safe & we need to bump the ordinal for 1.11.0 to 110. >> >>