Follow up of #25602
#25758

vipulnsward wants to merge vipulnsward:fix-key-len-issue into rails:master

We do not currently have an analysis of these two commits