[ 
https://issues.apache.org/jira/browse/CASSANDRA-11258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15282015#comment-15282015
 ] 

Paulo Motta commented on CASSANDRA-11258:
-----------------------------------------

Hey, sorry for the delay here. New tests look good! See follow-up below:

bq. I've added the check for if the lease was acquired in the case of a WTE

I still don't see this in the latest 
[commits|https://github.com/emolsson/cassandra/commits/CASSANDRA-11258], is 
there anything I'm missing? It seems that we [return 
null|https://github.com/emolsson/cassandra/blob/c527a9df4297bc1ddccd5869d0b9050efb005688/src/java/org/apache/cassandra/scheduling/CasLeaseFactory.java#L113]
 on an exception on {{processSilent}}, and threat null responses as [failure to 
acquire 
lock|https://github.com/emolsson/cassandra/blob/c527a9df4297bc1ddccd5869d0b9050efb005688/src/java/org/apache/cassandra/scheduling/CasLeaseFactory.java#L272]
 on {{renewLease}}. How about handling the exception on {{renewLease}} (instead 
of {{processSilent}}) and checking {{holdsLease}} before returning the lock?

bq. The reason for changing from insert to update was that with the previous 
insert a row marker is added with a TTL of 60(default TTL) and it doesn't get 
updated when renewing the lease since that uses an update.

I don't quite get this case, why won't the row get updated when renewing the 
lease? Can you clarify with an example?

bq. Since the comments/implementation details regarding update vs insert 
shouldn't affect the interface as such I'll start implementing the repair 
scheduling.

+1

> Repair scheduling - Resource locking API
> ----------------------------------------
>
>                 Key: CASSANDRA-11258
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11258
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Marcus Olsson
>            Assignee: Marcus Olsson
>            Priority: Minor
>
> Create a resource locking API & implementation that is able to lock a 
> resource in a specified data center. It should handle priorities to avoid 
> node starvation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to