Reviewed-by: Hui Fei <ferhui@apache.org> (cherry picked from commit ea65fc26d80db478f7e49749065c69da7e241bf0)