From pr-return-2272-apmail-cassandra-pr-archive=cassandra.apache.org@cassandra.apache.org Mon Jan 20 02:42:30 2020 Return-Path: X-Original-To: apmail-cassandra-pr-archive@minotaur.apache.org Delivered-To: apmail-cassandra-pr-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 51E5919A3D for ; Mon, 20 Jan 2020 02:42:30 +0000 (UTC) Received: (qmail 18317 invoked by uid 500); 20 Jan 2020 02:42:29 -0000 Delivered-To: apmail-cassandra-pr-archive@cassandra.apache.org Received: (qmail 18234 invoked by uid 500); 20 Jan 2020 02:42:29 -0000 Mailing-List: contact pr-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pr@cassandra.apache.org Delivered-To: mailing list pr@cassandra.apache.org Received: (qmail 18173 invoked by uid 99); 20 Jan 2020 02:42:29 -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; Mon, 20 Jan 2020 02:42:29 +0000 From: GitBox To: pr@cassandra.apache.org Subject: [GitHub] [cassandra] jolynch commented on a change in pull request #419: Hints Message-ID: <157948814951.9267.11109184909008209572.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Mon, 20 Jan 2020 02:42:29 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit jolynch commented on a change in pull request #419: Hints URL: https://github.com/apache/cassandra/pull/419#discussion_r368327589 ########## File path: doc/source/operating/hints.rst ########## @@ -1,22 +1,184 @@ -.. 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. - -.. highlight:: none - -Hints ------ - -.. todo:: todo +.. 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. + +.. highlight:: none + +Hints +===== + +Hints are a type of repair during a write operation. At times a write or an update cannot be replicated to all nodes satisfying the replication factor because a replica node is unavailable. Under such a condition the mutation (a write or update) is stored temporarily on the coordinator node in its filesystem. + +Hints are metadata associated with a mutation (a write or update) indicating that the mutation is not placed on a replica node (the target node) it is meant to be placed on because the node is temporarily unavailable, or is unresponsive. Hints are used to implement the eventual consistency guarantee that all updates are eventually received by all replicas and all replicas are eventually made consistent. When the replica node becomes available the hints are replayed on the node. + +As a primer on how replicas are placed in a cluster, Apache Cassandra replicates data to provide fault tolerance, high availability and durability. Cassandra partitions data across the cluster using consistent hashing in which a hash function is used on the partition keys to generate consistently ordered hash values (or tokens). An abstract ring represents the complete hash value range (token range) of the keys stored with each node in the cluster being assigned a certain subset range of hash values (range of tokens) it can store. The list of nodes responsible for a particular key is called its preference list. The preference list may include virtual nodes as a virtual node is also a node albeit an abstract node and not a physical node. Virtual nodes may need to be skipped to create a preference list in which the first N (N being the replication factor) nodes taken clockwise in the consistent hashing ring are all distinct physical nodes. All nodes in a cluster know which node/s should be in the preference list for a given key. The node that receives a request for a write operation (key/value data) forwards the request to the replica node that is in the preference list for the key. The node becomes a coordinator node and coordinates the reads and writes. + +Why are hints needed? +===================== + +Hints reduce the inconsistency window caused by temporary node unavailability. + +Consider that an update or mutation is to be made using the following configuration: + +- Consistency level : 2 Review comment: Consistency level: `LOCAL_QUORUM` (2/3) ---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org For additional commands, e-mail: pr-help@cassandra.apache.org