cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-9334) Returning null from a trigger does not abort the write
Date Thu, 04 Jun 2015 18:23:39 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-9334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aleksey Yeschenko updated CASSANDRA-9334:
-----------------------------------------
    Fix Version/s:     (was: 2.0.x)
                   2.2.0 beta 1
                   2.0.16
                   2.1.6

> Returning null from a trigger does not abort the write
> ------------------------------------------------------
>
>                 Key: CASSANDRA-9334
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9334
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>            Assignee: Sam Tunnicliffe
>             Fix For: 2.2.0 beta 1, 2.1.6, 2.0.16
>
>         Attachments: 9334-2.0.txt, 9334-test-trunk.txt
>
>
> The javadoc for ITrigger seems to indicate that returning null means no mutations for
the write will be applied at all:
> {noformat}
>      * Called exactly once per CF update, returned mutations are atomically updated.
>      *
>      * @param key - Row Key for the update.
>      * @param update - Update received for the CF
>      * @return modifications to be applied, null if no action to be performed.
> {noformat}
> and indeed, TriggerExecutor.execute seems to have code for this:
> {noformat}
>         if (augmentedMutations == null)
>             return null;
> {noformat}
> but it never fires.  In testing with a trigger that always returns null, the original
mutation is still applied.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message