From: <th...@us...> - 2010-08-16 19:11:47
|
Revision: 1919 http://azsmrc.svn.sourceforge.net/azsmrc/?rev=1919&view=rev Author: the8472 Date: 2010-08-16 19:11:41 +0000 (Mon, 16 Aug 2010) Log Message: ----------- fixing index usage, more annotations Modified Paths: -------------- mldht/branches/indexer/DHTIndexer.jar mldht/branches/indexer/lbms/plugins/mldht/indexer/MetaDataGatherer.java mldht/branches/indexer/lbms/plugins/mldht/indexer/TorrentDBEntry.java Modified: mldht/branches/indexer/DHTIndexer.jar =================================================================== (Binary files differ) Modified: mldht/branches/indexer/lbms/plugins/mldht/indexer/MetaDataGatherer.java =================================================================== --- mldht/branches/indexer/lbms/plugins/mldht/indexer/MetaDataGatherer.java 2010-08-16 18:51:18 UTC (rev 1918) +++ mldht/branches/indexer/lbms/plugins/mldht/indexer/MetaDataGatherer.java 2010-08-16 19:11:41 UTC (rev 1919) @@ -201,7 +201,7 @@ break; } - results = session.createQuery("from ihdata e where useindex(e, primary) is true and e.info_hash > ? and e.info_hash < ? and e.status = 0 and e.hitCount > 0 and e.lastFetchAttempt < ? order by e.info_hash") + results = session.createQuery("from ihdata e where useindex(e, info_hash) is true and e.info_hash > ? and e.info_hash < ? and e.status = 0 and e.hitCount > 0 and e.lastFetchAttempt < ? order by e.info_hash") .setBinary(0, startKey.getHash()) .setBinary(1, ceilKey.getHash()) .setLong(2, System.currentTimeMillis()/1000 - 3600) Modified: mldht/branches/indexer/lbms/plugins/mldht/indexer/TorrentDBEntry.java =================================================================== --- mldht/branches/indexer/lbms/plugins/mldht/indexer/TorrentDBEntry.java 2010-08-16 18:51:18 UTC (rev 1918) +++ mldht/branches/indexer/lbms/plugins/mldht/indexer/TorrentDBEntry.java 2010-08-16 19:11:41 UTC (rev 1919) @@ -18,6 +18,7 @@ import javax.persistence.*; +import org.hibernate.annotations.Index; import org.hibernate.annotations.NaturalId; import org.hibernate.annotations.OptimisticLockType; @@ -33,6 +34,7 @@ @NaturalId @Column(length=20,unique=true) + @Index(name="info_hash") byte[] info_hash; @@ -45,6 +47,7 @@ * 5 = metadata retrieved/available but not on local disk (error state) * 6 = indexer giving up (more than 10 failed upload attempts) (error state) */ + @Index(name="status") int status; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |