> Given that RackAwareEnsemble policy defaults to finding a replacement
> bookie within
> the same rack, when a bookie is lost in a rack, the entire cluster will be
> replicating
> to the same 'rack'. This puts a lot of pressure on the rack and also takes
> a longer time
> to bring up the replication levels.

I agree this has potential to be problematic.

Perhaps we should provide a switch to RackAwareEnsemble,
'preferReplaceInSameRack'.

> I would think the right fix is to bring back the targetBookie concept (with
> a configuration parameter) and add placement check predicate on top of it.
> When this is configured
> each bookie picks up the work,  checks if the ensemble placement policy
> gets satisfied,
> if so replicate it, if not move on.

I don't think adding a predicate argument (I guess a
BiPredicate<Set<BookieSocketAddress>, BookieSocketAddress>?) to the
recover bookie call makes sense. There is already a way to customize
this behaviour, by passing in a EnsemblePlacementPolicy on
Configuration of the client. The behaviour you want can be achieved by
taking one of the current EnsemblePlacementPolicies and overriding
replaceBookie, though I guess that's not very user-friendly. However,
even if it was user-friendly, how would we make it easy for users to
supply a placementpolicy or a even a predicate, as you suggested, to
the autorecovery daemon.

-Ivan

Reply via email to