Revision 7338
Added by ben leinfelder over 12 years ago
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java | ||
---|---|---|
1620 | 1620 |
|
1621 | 1621 |
pstmt.execute(); |
1622 | 1622 |
ResultSet rs = pstmt.getResultSet(); |
1623 |
boolean tablehasrows = rs.next(); |
|
1624 | 1623 |
logReplication.warn("Processing replication revision for documents"); |
1625 |
while (tablehasrows) {
|
|
1624 |
while (rs.next()) {
|
|
1626 | 1625 |
String recordDoctype = rs.getString(3); |
1627 | 1626 |
|
1628 | 1627 |
//If this is data file and it isn't configured to replicate data |
1629 | 1628 |
if (recordDoctype.equals("BIN") && !replicateData) { |
1629 |
logMetacat.debug("SKipping data file because data replication is not configured"); |
|
1630 |
|
|
1630 | 1631 |
// do nothing |
1631 |
continue; |
|
1632 | 1632 |
} else { |
1633 | 1633 |
String docid = rs.getString(1); |
1634 | 1634 |
int rev = rs.getInt(2); |
... | ... | |
1647 | 1647 |
revDocList.append("</revisionDocument>"); |
1648 | 1648 |
|
1649 | 1649 |
}//else |
1650 |
tablehasrows = rs.next(); |
|
1651 | 1650 |
} |
1652 | 1651 |
//System.out.println("The revision list is"+ revDocList.toString()); |
1653 | 1652 |
return revDocList.toString(); |
Also available in: Unified diff
remove possibility for infinite loop in case data replication is not configured for the server and a data file is encountered (yikes!)