InternalPartition replica addresses should be updated atomically instead of one-by-one to avoid inconsistent partition table reads. Also there's no need to update addresses using a CAS since InternalPartition update methods are called under InternalPartitionServiceImpl.lock.
Fixed signed-byte problem in PartitionStateGeneratorTest.
It's safe to process ReplicaSyncRetryResponse when partition table is updated, even before migration flag is cleared.
When partition is still migrating, replica sync request should be scheduled to a later time to avoid redundant sync requests.
Merge pull request #4270 from mdogan/partition-issue

InternalPartition replica addresses should be updated atomically