rackerlabs/otter — pull request #511 by manishtomar (2013-12-27 20:31:42+00:00)
Title: partition.finish() called only when it is allocated (please review)

`SetPartitioner.finish()` is expected to call only when it is allocated. The `SetPartitioner` code does not handle allocating case during finish. Not calling finish while allocating will also release the partition when otter shuts down since its session will be lost and all ephemeral nodes related to the partition will be deleted.

Earlier at some situations `SetPartitioner.finish` was called at same time the `time_boundary` while allocating got over. This caused exception in allocating code eventually not allowing otter to shutdown gracefully. This PR will avoid that situation.