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 790BA200C2A for ; Wed, 1 Mar 2017 08:26:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 77B3D160B70; Wed, 1 Mar 2017 07:26:33 +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 BF0D7160B5E for ; Wed, 1 Mar 2017 08:26:32 +0100 (CET) Received: (qmail 58047 invoked by uid 500); 1 Mar 2017 07:20:48 -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 58018 invoked by uid 99); 1 Mar 2017 07:20:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2017 07:20:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C48081A034D for ; Wed, 1 Mar 2017 07:20:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.347 X-Spam-Level: X-Spam-Status: No, score=-2.347 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GhSdI3lMNqRo for ; Wed, 1 Mar 2017 07:20:46 +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 70C8A5F254 for ; Wed, 1 Mar 2017 07:20:46 +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 C7C27E0534 for ; Wed, 1 Mar 2017 07:20:45 +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 5B78A2415C for ; Wed, 1 Mar 2017 07:20:45 +0000 (UTC) Date: Wed, 1 Mar 2017 07:20:45 +0000 (UTC) From: "Benjamin Roth (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-13064) Add stream type or purpose to stream plan / stream MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 01 Mar 2017 07:26:33 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Roth updated CASSANDRA-13064: -------------------------------------- Fix Version/s: 4.0 Status: Patch Available (was: Open) https://github.com/Jaumo/cassandra/commit/4189c949336f3c7e4ba25da80fdd7da5faa2ea65 > Add stream type or purpose to stream plan / stream > -------------------------------------------------- > > Key: CASSANDRA-13064 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13064 > Project: Cassandra > Issue Type: Improvement > Reporter: Benjamin Roth > Assignee: Benjamin Roth > Fix For: 4.0 > > > It would be very good to know the type or purpose of a certain stream on the receiver side. It should be both available in a stream request and a stream task. > Why? > It would be helpful to distinguish the purpose to allow different handling of streams and requests. Examples: > - In stream request a global flush is done. This is not necessary for all types of streams. A repair stream(-plan) does not require a flush as this has been done shortly before in validation compaction and only the sstables that have been validated also have to be streamed. > - In StreamReceiveTask streams for MVs go through the regular write path this is painfully slow especially on bootstrap and decomission. Both for bootstrap and decommission this is not necessary. Sstables can be directly streamed down in this case. Handling bootstrap is no problem as it relies on a local state but during decommission, the decom-state is bound to the sender and not the receiver, so the receiver has to know that it is safe to stream that sstable directly, not through the write-path. Thats why we have to know the purpose of the stream. > I'd love to implement this on my own but I am not sure how not to break the streaming protocol for backwards compat or if it is ok to do so. > Furthermore I'd love to get some feedback on that idea and some proposals what stream types to distinguish. I could imagine: > - bootstrap > - decommission > - repair > - replace node > - remove node > - range relocation > Comments like this support my idea, knowing the purpose could avoid this. > {quote} > // TODO each call to transferRanges re-flushes, this is potentially a lot of waste > streamPlan.transferRanges(newEndpoint, preferred, keyspaceName, ranges); > {quote} > And alternative to passing the purpose of the stream was to pass flags like: > - requiresFlush > - requiresWritePathForMaterializedView > ... > I guess passing the purpose will make the streaming protocol more robust for future changes and leaves decisions up to the receiver. > But an additional "requiresFlush" would also avoid putting too much logic into the streaming code. The streaming code should not care about purposes, the caller or receiver should. So the decision if a stream requires as flush before stream should be up to the stream requester and the stream request receiver depending on the purpose of the stream. > I'm excited about your feedback :) -- This message was sent by Atlassian JIRA (v6.3.15#6346)