Reputation: 16723
Is there a way to determine if the delete
operation actually deleted a partition if the partition existed? I am running the following cql
queries. I was hoping that I'll get an error when I'll specify an invalid partition but I don't
cqlsh:mypartition> select * from users;
bucket | email | authprovider | firstname | lastname | confirmed | hasher | id | password | salt
--------+---------------+--------------+-----------+----------+-----------+------------+--------------------------------------+--------------+------
1 | [email protected] | credentials | fn | ln | False | someHasher | 11111111-1111-1111-1111-111111111111 | somePassword |
(1 rows)
cqlsh:mypartition> DELETE FROM users WHERE bucket=1 AND email='[email protected]';
cqlsh:mypartition> select * from users;
bucket | email | authprovider | firstname | lastname | confirmed | hasher | id | password | salt
--------+---------------+--------------+-----------+----------+-----------+------------+--------------------------------------+--------------+------
1 | [email protected] | credentials | fn | ln | False | someHasher | 11111111-1111-1111-1111-111111111111 | somePassword |
(1 rows)
cqlsh:mypartition> DELETE FROM users WHERE bucket=1 AND email='[email protected]';
cqlsh:codingjedi> select * from users;
bucket | email | authprovider | firstname | lastname | confirmed | hasher | id | password | salt
--------+-------+--------------+-----------+----------+-----------+--------+----+----------+------
(0 rows)
cqlsh:codingjedi>
Upvotes: 1
Views: 24
Reputation: 1566
You can't. Deletes are just writes, and Cassandra sorts it out in compaction.
Upvotes: 2