Fix assign_partition_id to use .empty() instead of .size()