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 A18CF200C3A for ; Fri, 31 Mar 2017 20:20:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A0586160B9F; Fri, 31 Mar 2017 18:20:46 +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 EBEDC160B7C for ; Fri, 31 Mar 2017 20:20:45 +0200 (CEST) Received: (qmail 1294 invoked by uid 500); 31 Mar 2017 18:20:44 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 1283 invoked by uid 99); 31 Mar 2017 18:20:44 -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; Fri, 31 Mar 2017 18:20:44 +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 2E16FC1282 for ; Fri, 31 Mar 2017 18:20:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 07Wgcysno896 for ; Fri, 31 Mar 2017 18:20:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id EC83E5FC04 for ; Fri, 31 Mar 2017 18:20:42 +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 492A8E0959 for ; Fri, 31 Mar 2017 18:20:42 +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 A9DE921DDC for ; Fri, 31 Mar 2017 18:20:41 +0000 (UTC) Date: Fri, 31 Mar 2017 18:20:41 +0000 (UTC) From: "Jason Brown (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13321) Add a checksum component for the sstable metadata (-Statistics.db) file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 31 Mar 2017 18:20:46 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15951431#comment-15951431 ] Jason Brown commented on CASSANDRA-13321: ----------------------------------------- Overall, I like the ideas here, and the {{VersionedComponent}} should work fine. I mostly just have some minor general questions and a few (perhaps premature) trivial nits. questions: - In {{SSTableReader#mutateRepaired}} and {{#mutateLevel}}, you call {{sstableMetadataVersion.get()}} and pass the value to {{MetadataSerializer#mutateLevel/mutateRepaired}}, where there's a bit of magic that adds 1 to the {{fileVersion}}. Then, the next line in {{SSTableReader#mutateRepaired}} calls {{sstableMetadataVersion.incrementAndGet()}}. Thus, I'm not sure if the {{fileVersion}} argument to {{MetadataSerializer#mutateLevel/mutateRepaired}} should be the current file version, or the next file version. - when stats file is updated for a specific sstable generation, will all the versions of stats/crc files be cleaned up when the owning sstable is deleted? - Is the addition of an extra "number" in the file name going to confuse any tools we have? Admiteddly I was lazy and didn't look yet. trivial nits: - it would be nice to add a comment to {{VersionedComponent}} to explain how {{VersionedComponent#version}} is different from {{Descriptor#generation}}. - {{VersionedComponent}} constuctors. The variable name for the {{Type}} parameter is {{stats}} in several places. I think you meant to call it {{type}} (or something similar) and {{stats}} was just a mistake/quick thing to do while you were knocking it out. > Add a checksum component for the sstable metadata (-Statistics.db) file > ----------------------------------------------------------------------- > > Key: CASSANDRA-13321 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13321 > Project: Cassandra > Issue Type: Improvement > Reporter: Marcus Eriksson > Assignee: Marcus Eriksson > Fix For: 4.x > > > Since we keep important information in the sstable metadata file now, we should add a checksum component for it. One danger being if a bit gets flipped in repairedAt we could consider the sstable repaired when it is not. -- This message was sent by Atlassian JIRA (v6.3.15#6346)