fix(collections): chunk writing of collections (#17724)