[metacat-cvs] metacat/src/edu/ucsb/nceas/metacat MetacatReplication.java
Jing Tao
tao at ecoinformatics.org
Tue Nov 8 14:14:16 PST 2005
tao 05/11/08 14:14:16
Modified: src/edu/ucsb/nceas/metacat MetacatReplication.java
Log:
Using join query for more efficiency.
Revision Changes Path
1.79 +5 -4 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.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- MetacatReplication.java 8 Nov 2005 18:21:00 -0000 1.78
+++ MetacatReplication.java 8 Nov 2005 22:14:16 -0000 1.79
@@ -7,8 +7,8 @@
* Release: @release@
*
* '$Author: tao $'
- * '$Date: 2005/11/08 18:21:00 $'
- * '$Revision: 1.78 $'
+ * '$Date: 2005/11/08 22:14:16 $'
+ * '$Revision: 1.79 $'
*
* 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,13 +1182,14 @@
// 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 where (docid not in (select a.docid from xml_documents a, xml_revisions b where a.docid=b.docid and a.rev<=b.rev)) ");
+ docsql.append(dbAdapter.getReplicationDocumentListSQL());
+ //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 serverLocationDoc = " and server_location = 1";
+ String serverLocationDoc = " and a.server_location = 1";
String serverLocationRev = "where server_location = 1";
docsql.append(serverLocationDoc);
revisionSql.append(serverLocationRev);
More information about the Metacat-cvs
mailing list