Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63F741872A for ; Thu, 16 Jul 2015 10:21:10 +0000 (UTC) Received: (qmail 99865 invoked by uid 500); 16 Jul 2015 10:21:05 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 99789 invoked by uid 500); 16 Jul 2015 10:21:05 -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 99770 invoked by uid 99); 16 Jul 2015 10:21:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 10:21:04 +0000 Date: Thu, 16 Jul 2015 10:21:04 +0000 (UTC) From: "Benedict (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8963) Make OpOrder more intuitive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629529#comment-14629529 ] Benedict commented on CASSANDRA-8963: ------------------------------------- bq. But if that's not possible It's not, it's pretty fundamental to correctness in the memtable case. bq. the actual usages of the class are barely documented. Sure, I'll address that bq. delaying it post-3.0 because I really think this can wait. We _need_ the functionality of "MultiPhaseOp". "RestartableOp" "SynchronizingOp" or whatever we call it in 3.0 for secondary index changes. We could just deliver it by itself, but I had hoped this would be reasonably easy to mark this whole item off our TODO list at the same time. If comments and naming are the only point of contention, I think that's still achievable, since I've pretty much agreed to rollover and accept whatever names [~JoshuaMcKenzie] decides on after my last comments. This change also gives us some greater safety against misuse, and the easy addition of further safety. Given the number of potentially scary changes around OpOrder usage post-8099 (the latest incarnation of which I've still not personally reviewed, since they were changed immediately preceding the 8099 commit), that is also likely of value. bq. Hopefully the actual suggestion of my comment are not totally waste of time however. Not at all. I'll be sure to use it. > Make OpOrder more intuitive > --------------------------- > > Key: CASSANDRA-8963 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8963 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Benedict > Assignee: Benedict > Priority: Minor > Fix For: 3.x > > > There has been plenty of feedback about OpOrder being unintuitive. As well as revisiting the naming, I propose to introduce an Action object with RAII (AutoCloseable) protection that should be more obvious to users of the API. We can also then protect this by a Ref instance for use cases where the action lifetime is illdefined, and perhaps also introduce some checks for actions whose lifetimes extend beyond a sensible limit to report those where the object reference is retained. -- This message was sent by Atlassian JIRA (v6.3.4#6332)