Folks,

I have been doing some work on clustered search (more on future email)
and I begun looking at the task lock recently implemented in 3.1. I
believe (and have verified with Allen) that we might need to make some
changes to both the API and implementation so it works properly on a
cluster of size 2 or more. Currently I think we can have a couple of
places where two nodes can obtain a lock at the same time.

I'm working on some pseudo-code you all can review to make sure we are
safe from these issues above. I also want to refactor the interfaces to
reflect more the use of leases as opposed to locks.

interface LeaseManager {

  registerLease(String name, String id, long leaseTime);
  renewLease(String name, String id);
  unregisterLease(String name, String id);

}

If you notice, I'm introducing a new property (id) that will be used to
identify which node in the cluster has the lease in order that we can
allow for renewals if they desire so. Currently, we only have support
for task name and that's enough for what I'm trying to do. I'll explain
more in my next email and if I'm brief on this one is because I must
worry about dinner and putting the kids to bed.

-Elias

Reply via email to