incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramzi Rabah <rra...@playdom.com>
Subject Small HintedHanoffManager improvement?
Date Mon, 21 Dec 2009 18:46:02 GMT
Hi guys,
before I go ahead and open an enhancement bug for this, I just want to
make sure it is valid.
In HintedHandOffManager in the part where we deliver a message to the
target node:

private static boolean sendMessage(InetAddress endPoint, String
tableName, String key) throws IOException
    {
        if (!FailureDetector.instance().isAlive(endPoint))
        {
            return false;
        }

        Table table = Table.open(tableName);
        RowMutation rm = new RowMutation(tableName, key);
        for (ColumnFamilyStore cfstore : table.getColumnFamilyStores().values())
        {
            ColumnFamily cf = cfstore.getColumnFamily(new
IdentityQueryFilter(key, new
QueryPath(cfstore.getColumnFamilyName())));
            if (cf != null)
                rm.add(cf);
        }
        Message message = rm.makeRowMutationMessage();
        WriteResponseHandler responseHandler = new WriteResponseHandler(1);
        MessagingService.instance().sendRR(message, new InetAddress[]
{ endPoint }, responseHandler);
...

It seems that we still send a row mutation even if the cf of the row
is null. My question is, what is the point of sending a RowMutation
with an empty cf. I don't believe this will break anything (if we
handle a mutation message with an empty cf properly), but it seems to
me like a redundant mutation message sent and processed.

On a different note, I have a few questions about HHOM design.
HintedHandOffManager seems to send the whole CF for a key, even if the
only thing that changed was a value in 1 single column. Will this
scale if I have a CF with 1000 columns, and why not only send that one
column?

And one last question about HHOM, since the node that is handling the
Hint might not be (and is probably not) one of the replicas if I
understood the code correctly, Will the data written to it ever be
cleaned, if I issue a delete later on down the line?

My 2 cents :)
Ramzi

Mime
View raw message