[ https://issues.apache.org/jira/browse/CASSANDRA-19455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17823124#comment-17823124 ]
Stefan Miklosovic edited comment on CASSANDRA-19455 at 3/4/24 10:56 AM: ------------------------------------------------------------------------ Steps I did: 1) git checkout cassandra-3.11 2) ant artifacts 3) cd examples/triggers && ant 3) copied and extracted tarball into /tmp and copied trigger jar from 3) to conf/triggers 4) started Cassandra 3.11, created tables and triggeer, inserted some data and I see records in test.audit table as per example in examples/triggers 5) shut down Cassandra 3.11, checkouted cassandra-4.0 branch, ant artifacts, cd examples/triggers && ant, copied tarball to /tmp, extracted and copied trigger to conf/triggers, copied all data dir from cassandra-3.11 to cassandra-4.0 6) started 4.0, inserted more data to tables as per example, trigger creates new entries in test.audit Now it is worth to say that implementation-wise, the trigger in examples in 3.11 does differ from the one in 4.0, there are changed imports etc so it is not the same thing. The trigger for 4.0 has to be specifically tailored to that version and it is not 1:1 replacement. I would suggest to triple check if the trigger jar is properly implemented for Cassandra 4.0 as moving a jar from 3.11 to 4.0 and expect it to work might be problematic and probably does not work if imports are not aligned etc. I also do not understand why the author of this ticket tries to create a trigger again if it was already existing in 3.11 already and he just bumped the cassandra tarball as such but data dir was same for 3.11 / 4.0. was (Author: smiklosovic): Steps I did: 1) git checkout cassandra-3.11 2) ant artifacts 3) cd examples/triggers && ant 3) copied and extracted tarball into /tmp and copied trigger jar from 3) to conf/triggers 4) started Cassandra 3.11, created tables and triggeer, inserted some data and I see records in test.audit table as per example in examples/triggers 5) shut down Cassandra 3.11, checkouted cassandra-4.0 branch, ant artifacts, cd examples/triggers && ant, copied tarball to /tmp, extracted and copied trigger to conf/triggers, copied all data dir from cassandra-3.11 to cassandra-4.0 6) started 4.0, inserted more data to tables as per example, trigger creates new entries in test.audit Now it is worth to say that implementation-wise, the trigger in examples in 3.11 does differ from the one in 4.0, there are changed imports etc so it is not the same thing. The trigger for 4.0 has to be specifically tailored to that version and it is not 1:1 replacement. I would suggest to triple check if the trigger jar loads fine and if it does not why it is so. I also do not understand why the author of this ticket tries to create a trigger again if it was already existing in 3.11 already and he just bumped the cassandra tarball as such but data dir was same for 3.11 / 4.0. > Create Trigger is not working on 4.x version cassandra > ------------------------------------------------------ > > Key: CASSANDRA-19455 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19455 > Project: Cassandra > Issue Type: Bug > Components: Local/Other > Reporter: Hakan OTAL > Assignee: Stefan Miklosovic > Priority: Normal > Fix For: 4.0.x > > > Current version is 3.11.16 , try to upgrade 4.0.0 , 4.0.5 ,4.0.12 and both > of 4.x version gives below error. > > Reload triggers is executed , custom trigger jar put in correct path > "../conf/triggers". > > cassandra@cqlsh:radius> CREATE TRIGGER radacct_trigger ON radius.radacct > USING 'com.XXXX.cassandra.trigger.RadAcctTrigger'; > > InvalidRequest: Error from server: code=2200 [Invalid query] message="Trigger > class 'com.XXXX.cassandra.trigger.RadAcctTrigger' couldn't be loaded" > > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org