2009/12/22 Ramzi Rabah <rra...@playdom.com>

> 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?
>
-------------------------------------
Remind that column is only a kind of tags. Only new data will be written to
the hint-node. So all the data of the key in the hint-node are new to the
node that come back again. So all the data should be sent to the node.

>
> 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?
>
> -------------------------------------
All the data should be cleaned manually by issuing "nodeprobe cleanup".
WARN: if there're hinted data in the node, donot use cleanup. Just using it
when the cluster is stable.

My 2 cents :)
> Ramzi
>

Reply via email to