You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Nicholas Telford (JIRA)" <ji...@apache.org> on 2011/05/23 21:08:47 UTC

[jira] [Created] (CASSANDRA-2693) Renaming/Dropping Keyspace shouldn't touch hints

Renaming/Dropping Keyspace shouldn't touch hints
------------------------------------------------

                 Key: CASSANDRA-2693
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2693
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
            Reporter: Nicholas Telford
            Priority: Trivial


Currently, when renaming or dropping a keyspace, HintedHandoffManager.renameHints() is called to drop and re-insert every hint for that keyspace with the new keyspace name.

This code appears to have been written for a different HintsCF schema, as it drops the row named by the old keyspace name and re-creates all of it's columns under the key of the new keyspace name. This is not the current HintsCF schema. It seems the impact of this is that it doesn't do anything (beyond a pointless index scan for the HintsCF) as the keys will never exist.

It looks safe to remove this code entirely and let the hints simply become invalid. When they're replayed invalid hints are silently dropped, which seems like the best option.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2693) Renaming/Dropping Keyspace shouldn't touch hints

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2693:
--------------------------------------

    Fix Version/s: 0.7.7

> Renaming/Dropping Keyspace shouldn't touch hints
> ------------------------------------------------
>
>                 Key: CASSANDRA-2693
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2693
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Nicholas Telford
>            Priority: Trivial
>             Fix For: 0.7.7
>
>         Attachments: CASSANDRA-2693-remove-hint-changes-on-keyspace-change-001.diff
>
>
> Currently, when renaming or dropping a keyspace, HintedHandoffManager.renameHints() is called to drop and re-insert every hint for that keyspace with the new keyspace name.
> This code appears to have been written for a different HintsCF schema, as it drops the row named by the old keyspace name and re-creates all of it's columns under the key of the new keyspace name. This is not the current HintsCF schema. It seems the impact of this is that it doesn't do anything (beyond a pointless index scan for the HintsCF) as the keys will never exist.
> It looks safe to remove this code entirely and let the hints simply become invalid. When they're replayed invalid hints are silently dropped, which seems like the best option.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2693) Renaming/Dropping Keyspace shouldn't touch hints

Posted by "Nicholas Telford (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038152#comment-13038152 ] 

Nicholas Telford commented on CASSANDRA-2693:
---------------------------------------------

Is that within the scope of this ticket?

> Renaming/Dropping Keyspace shouldn't touch hints
> ------------------------------------------------
>
>                 Key: CASSANDRA-2693
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2693
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Nicholas Telford
>            Priority: Trivial
>             Fix For: 0.7.7
>
>         Attachments: CASSANDRA-2693-remove-hint-changes-on-keyspace-change-001.diff
>
>
> Currently, when renaming or dropping a keyspace, HintedHandoffManager.renameHints() is called to drop and re-insert every hint for that keyspace with the new keyspace name.
> This code appears to have been written for a different HintsCF schema, as it drops the row named by the old keyspace name and re-creates all of it's columns under the key of the new keyspace name. This is not the current HintsCF schema. It seems the impact of this is that it doesn't do anything (beyond a pointless index scan for the HintsCF) as the keys will never exist.
> It looks safe to remove this code entirely and let the hints simply become invalid. When they're replayed invalid hints are silently dropped, which seems like the best option.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2693) Renaming/Dropping Keyspace shouldn't touch hints

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038153#comment-13038153 ] 

Jonathan Ellis commented on CASSANDRA-2693:
-------------------------------------------

No. :)

> Renaming/Dropping Keyspace shouldn't touch hints
> ------------------------------------------------
>
>                 Key: CASSANDRA-2693
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2693
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Nicholas Telford
>            Priority: Trivial
>             Fix For: 0.7.7
>
>         Attachments: CASSANDRA-2693-remove-hint-changes-on-keyspace-change-001.diff
>
>
> Currently, when renaming or dropping a keyspace, HintedHandoffManager.renameHints() is called to drop and re-insert every hint for that keyspace with the new keyspace name.
> This code appears to have been written for a different HintsCF schema, as it drops the row named by the old keyspace name and re-creates all of it's columns under the key of the new keyspace name. This is not the current HintsCF schema. It seems the impact of this is that it doesn't do anything (beyond a pointless index scan for the HintsCF) as the keys will never exist.
> It looks safe to remove this code entirely and let the hints simply become invalid. When they're replayed invalid hints are silently dropped, which seems like the best option.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2693) Renaming/Dropping Keyspace shouldn't touch hints

Posted by "Nicholas Telford (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicholas Telford updated CASSANDRA-2693:
----------------------------------------

    Attachment: CASSANDRA-2693-remove-hint-changes-on-keyspace-change-001.diff

Removed HintedHandoffManager.renameHints(). Renaming or dropping a keyspace now leaves old hints to be discarded during replay.

> Renaming/Dropping Keyspace shouldn't touch hints
> ------------------------------------------------
>
>                 Key: CASSANDRA-2693
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2693
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Nicholas Telford
>            Priority: Trivial
>             Fix For: 0.7.7
>
>         Attachments: CASSANDRA-2693-remove-hint-changes-on-keyspace-change-001.diff
>
>
> Currently, when renaming or dropping a keyspace, HintedHandoffManager.renameHints() is called to drop and re-insert every hint for that keyspace with the new keyspace name.
> This code appears to have been written for a different HintsCF schema, as it drops the row named by the old keyspace name and re-creates all of it's columns under the key of the new keyspace name. This is not the current HintsCF schema. It seems the impact of this is that it doesn't do anything (beyond a pointless index scan for the HintsCF) as the keys will never exist.
> It looks safe to remove this code entirely and let the hints simply become invalid. When they're replayed invalid hints are silently dropped, which seems like the best option.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2693) Renaming/Dropping Keyspace shouldn't touch hints

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038150#comment-13038150 ] 

Jonathan Ellis commented on CASSANDRA-2693:
-------------------------------------------

There is one problem w/ the current ignore-hints-for-dropped-CFs code: if a CF is dropped, then re-added, hints from the old one can be replayed.

Storing CF id instead of tablename/cfname would fix this.

> Renaming/Dropping Keyspace shouldn't touch hints
> ------------------------------------------------
>
>                 Key: CASSANDRA-2693
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2693
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Nicholas Telford
>            Priority: Trivial
>             Fix For: 0.7.7
>
>         Attachments: CASSANDRA-2693-remove-hint-changes-on-keyspace-change-001.diff
>
>
> Currently, when renaming or dropping a keyspace, HintedHandoffManager.renameHints() is called to drop and re-insert every hint for that keyspace with the new keyspace name.
> This code appears to have been written for a different HintsCF schema, as it drops the row named by the old keyspace name and re-creates all of it's columns under the key of the new keyspace name. This is not the current HintsCF schema. It seems the impact of this is that it doesn't do anything (beyond a pointless index scan for the HintsCF) as the keys will never exist.
> It looks safe to remove this code entirely and let the hints simply become invalid. When they're replayed invalid hints are silently dropped, which seems like the best option.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira