Replicate deleted documents in Replication
Currently in Delta-timed replication, metacat only replicated the documents in
xml_documents table. So even after the replication, the two metacats are not
identical. We need to add the feature that metacat will replicate the deleted
documents(including deleted version too).
#1 Updated by Jing Tao over 14 years ago
Here is the new approach:
When metacat A send a command "update" to metacat B, B will send two doclist to A.
The first doclist is documents in xml_revisions(Same docid but different
revision number will considered as two documents). When A got this list, it will
check if its' xml_revisions table has the doc(from the list) or not. If
xml_revisions has it, do nothing. Otherwise, it will send a request to download
it. After download finished, delete the documents(Metacat delete, only delete it
from xml_documents, xml_relations and xml_access et al. But the xml_nodes will
still has the record).
The second doclist is documents in xml_documents(current searchable documents).
When A got this list, it will check if its' xml_documents has it or not. If the
documents is not in xml_documents or even in it but revision number is less
than the list from B, A will send a request to download it.
#2 Updated by Jing Tao almost 14 years ago
Now, we add documents in xml_revisions table to the reponse of getUpdate action.
I also modify the code for writing document in xml_revisions: it will not
generate anything in relation and access table. The doc enrty will show in
xml_revision table and nodes will show in xml_nodes_revision table.