writeData should check partition collection size