unify batch + ldp write operation logic