Update metadata and documents.
write Changes.