I use the default procedure generated by voltdb to update the below table,
schema:
create table sys_sec_user_org_role(
user_id bigint not null,
org_id integer not null,
role_id integer not null,
primary key(user_id,role_id,org_id)
);
partition table sys_sec_user_org_role on column user_id;
and then the default procedures were created successfully,I call procedures in the following order
insert:exec SYS_SEC_USER_ORG_ROLE.insert 2 3 4
sucess:modified_tuples:1
and then delete the inserted row
delete:exec SYS_SEC_USER_ORG_ROLE.delete 2 3 4
modified_tuples:0
I don't know why the default delete or update don't work on this table while most cases work.
[Updated]
I work at VoltDB. Thank you for sharing this. I got the same results as you and initially thought this was a bug, but one of our engineers noticed the problem.
While the .insert procedure takes the parameters in the order the columns are defined in the table, the .update and procedures are only generated if there is a primary key defined, and the arguments need to be in the order of the columns as defined in the primary key.
If you pass in the arguments in the order of the primary key columns, the default procedures will find the matching row and update or delete it.
--exec <tablename>.delete <user_id> <role_id> <org_id>;
exec SYS_SEC_USER_ORG_ROLE.delete 2 4 3;
(Returned 1 rows in 0.02s)
Here is the ticket I logged earlier for reference.