[metacat-cvs] metacat/src/edu/ucsb/nceas/metacat MetacatReplication.java
Jing Tao
tao at ecoinformatics.org
Tue Nov 8 10:21:00 PST 2005
tao 05/11/08 10:21:00
Modified: src/edu/ucsb/nceas/metacat MetacatReplication.java
Log:
Fixed bug to get docid list.
Revision Changes Path
1.78 +8 -7 metacat/src/edu/ucsb/nceas/metacat/MetacatReplication.java
Index: MetacatReplication.java
===================================================================
RCS file: /cvs/metacat/src/edu/ucsb/nceas/metacat/MetacatReplication.java,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- MetacatReplication.java 2 Nov 2005 23:52:42 -0000 1.77
+++ MetacatReplication.java 8 Nov 2005 18:21:00 -0000 1.78
@@ -7,8 +7,8 @@
* Release: @release@
*
* '$Author: tao $'
- * '$Date: 2005/11/02 23:52:42 $'
- * '$Revision: 1.77 $'
+ * '$Date: 2005/11/08 18:21:00 $'
+ * '$Revision: 1.78 $'
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1182,15 +1182,16 @@
// Get correct docid that reside on this server according the requesting
// server's replicate and data replicate value in xml_replication table
- docsql.append("select docid, rev, doctype from xml_documents ");
+ 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)) ");
revisionSql.append("select docid, rev, doctype from xml_revisions ");
// If the localhost is not a hub to the remote server, only replicate
// the docid' which home server is local host (server_location =1)
if (!serverList.getHubValue(server))
{
- String serverLocation = "where server_location = 1";
- docsql.append(serverLocation);
- revisionSql.append(serverLocation);
+ String serverLocationDoc = " and server_location = 1";
+ String serverLocationRev = "where server_location = 1";
+ docsql.append(serverLocationDoc);
+ revisionSql.append(serverLocationRev);
}
logMetacat.info("Doc sql: "+docsql.toString());
More information about the Metacat-cvs
mailing list