Revision 2719
Added by Jing Tao about 19 years ago
src/edu/ucsb/nceas/metacat/MetacatReplication.java | ||
---|---|---|
1182 | 1182 |
|
1183 | 1183 |
// Get correct docid that reside on this server according the requesting |
1184 | 1184 |
// server's replicate and data replicate value in xml_replication table |
1185 |
docsql.append("select docid, rev, doctype from xml_documents "); |
|
1185 |
docsql.append("select docid, rev, doctype from xml_documents where (docid not in (select a.docid from xml_documents a, xml_revisions b where a.docid=b.docid and a.rev<=b.rev)) ");
|
|
1186 | 1186 |
revisionSql.append("select docid, rev, doctype from xml_revisions "); |
1187 | 1187 |
// If the localhost is not a hub to the remote server, only replicate |
1188 | 1188 |
// the docid' which home server is local host (server_location =1) |
1189 | 1189 |
if (!serverList.getHubValue(server)) |
1190 | 1190 |
{ |
1191 |
String serverLocation = "where server_location = 1"; |
|
1192 |
docsql.append(serverLocation); |
|
1193 |
revisionSql.append(serverLocation); |
|
1191 |
String serverLocationDoc = " and server_location = 1"; |
|
1192 |
String serverLocationRev = "where server_location = 1"; |
|
1193 |
docsql.append(serverLocationDoc); |
|
1194 |
revisionSql.append(serverLocationRev); |
|
1194 | 1195 |
} |
1195 | 1196 |
logMetacat.info("Doc sql: "+docsql.toString()); |
1196 | 1197 |
|
Also available in: Unified diff
Fixed bug to get docid list.