Cherry picked last commit 228f6 from db branch into v1.62