You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Robert Stupp (JIRA)" <ji...@apache.org> on 2014/07/23 21:37:38 UTC

[jira] [Commented] (CASSANDRA-7600) Schema change notifications sent for no-op DDL statements

    [ https://issues.apache.org/jira/browse/CASSANDRA-7600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14072210#comment-14072210 ] 

Robert Stupp commented on CASSANDRA-7600:
-----------------------------------------

Suggestion: {{SchemaAlteringStatement#announceMigration}} could return a {{boolean}} to {{execute/executeInternal}} to indicate whether there is a schema change.

{noformat}
    public abstract boolean announceMigration(boolean isLocalOnly) throws RequestValidationException;

    public ResultMessage execute(QueryState state, QueryOptions options) throws RequestValidationException
    {
        if (!announceMigration(false))
            return null;
        return new ResultMessage.SchemaChange(changeEvent());
    }

    public ResultMessage executeInternal(QueryState state, QueryOptions options)
    {
        try
        {
            if (!announceMigration(true))
                return null;
            return new ResultMessage.SchemaChange(changeEvent());
        }
        catch (RequestValidationException e)
        {
            throw new RuntimeException(e);
        }
    }
{noformat}

> Schema change notifications sent for no-op DDL statements
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-7600
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7600
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tyler Hobbs
>            Assignee: Tyler Hobbs
>            Priority: Minor
>             Fix For: 2.0.10, 2.1.1
>
>
> When schema changes are made with {{IF \[NOT\] EXISTS}} conditions, we return schema change messages (and push out schema change notifications) even if the {{IF \[NOT\] EXISTS}} condition makes it a no-op.
> This results in extra work for native protocol drivers, which typically wait for schema agreement and refresh their schema metadata when schema changes occur.



--
This message was sent by Atlassian JIRA
(v6.2#6252)