I got the resolution,
I was getting AFCG since i was updating the file by alternate-key as well as Base-key.
A transaction performing updates by the alternate key may be acquiring locks in a different order to a transaction performing updates by the base key. So mixing the two may cause dead-lock.