ReplicatedPG: Don't use the return value of getattr_maybe_cache as attr
length.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>