You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Gregory Cooper <gr...@gmail.com> on 2013/10/29 15:15:05 UTC

Expiring Columns Callback

Hi all,

We have a need to be able to notify downstream systems when certain columns
have expired. Given the way Cassandra does distributed deletes and
tombstones it seems like compaction time is only time that this is fairly
predictable but the notifications will 'lag' a bit from when the columns
have actually expired.

Attached is a patch (against a 1.1.x branch) with what I am currently
working with. I am in the middle of getting a decent unit test together.

I wonder if this is even a sound approach, however. So, given the attached
patch I have a few questions:

1. What would be the best place to put a callback mechanism for column
notifications (given the context of a row key as well) where these expired
columns would be known about as soon as possible?

2. What about the "at compaction time" approach I have attached? I
currently have the mechanism plugged into the "PrecompactedRow.java" class
that will notify a custom compaction strategy if so desired.  As I
mentioned I am still working out a suitable unit test and am still
struggling with the flushes and timing involved (and perhaps caches?).


I'm grateful for any guidance you might have. Better places to hook this in
for compaction?  A more sound approach for earlier notifications? etc...


Regards,

Greg