1

With PHPCassa I am removing a row. But when I use remove($uuid) the uuid stays in the DB. Is there a way to remove the row and the RowKey?

Thanks in advance.

jnbdz
  • 4,863
  • 9
  • 51
  • 93

1 Answers1

2

Short answer: no.

See the explanation in the FAQ: Why do deleted keys show up during range scans?

Tyler Hobbs
  • 6,872
  • 24
  • 31
  • Hi Tyler. I know this is an old post, but does this mean there is no way to delete a row (completely) in cassandra? Because `$cf->remove("key")` (in phpcassa) still leaves some columns on the row, as well as the row key. I've tried running a cleanup and a compaction, be they are still there. Aren't we gonna run out of resources? How can I get around this issue? – Sthe Nov 28 '12 at 19:56
  • `$cf->remove("key")` should not leave any columns in the row. If it is, you likely have a problem with timestamps. Make sure your clocks are synced and all of your clients are using the same timestamp resolution; phpcassa uses microseconds since the epoch. – Tyler Hobbs Nov 29 '12 at 00:41
  • Thanks for the comment. I'm not sure if this is the case because I'm still testing on localhost in one machine, but if it is the case, how do I make sure that the clocks are synced? – Sthe Dec 01 '12 at 04:46
  • If all clients that are writing to Cassandra are running on the same machine, you don't have to worry about clocks. What other libraries/clients are you writing to Cassandra with? How are you determining that there are still live columns? – Tyler Hobbs Dec 02 '12 at 22:21
  • I see. I'm using OpsCenter from DataStax. That's how I can tell that those rows are not removed completely. Just for future reference (when I deploy the solution to production), how do I make sure that the clocks are in sync? – Sthe Dec 03 '12 at 07:10
  • 1
    You can just use ntp to keep your clocks in sync. – Tyler Hobbs Dec 04 '12 at 01:23
  • Is there any reason why Opscenter would continue picking up these rows according to your knowledge? – Sthe Dec 04 '12 at 08:16
  • If OpsCenter is still showing the columns, then they still exist. I would suspect something else is wrong with your remove() call. Perhaps the key is wrong? (Try inserting a new column with that key to test.) Are you specifying any other arguments to remove()? – Tyler Hobbs Dec 04 '12 at 18:15
  • Currently I don't specify any arguments in `remove()`. I know it has the correct key because it removes all the columns (sometimes) and leaves an empty row (the key remains). – Sthe Dec 05 '12 at 07:53