Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug fix: ZOIE-100

  • Loading branch information...
commit 96b603305a9f535d1546c362945cc7d804e616c3 1 parent 527f8e1
@javasoze javasoze authored
View
18 zoie-core/src/main/java/proj/zoie/impl/indexing/internal/BatchedIndexDataLoader.java
@@ -330,6 +330,18 @@ protected void processBatch()
{
long t1=System.currentTimeMillis();
int eventCount = tmpList.size();
+ Comparator<String> versioComparator = _idxMgr.getVersionComparator();
+ for (DataEvent<ZoieIndexable> evt : tmpList){
+ String newVersion = evt.getVersion();
+ if (currentVersion==null){
+ currentVersion = newVersion;
+ }
+ else{
+ if (versioComparator.compare(currentVersion, newVersion)<0){
+ currentVersion = newVersion;
+ }
+ }
+ }
try
{
_dataLoader.consume(tmpList);
@@ -351,9 +363,9 @@ protected void processBatch()
IndexUpdatedEvent evt = new IndexUpdatedEvent(eventCount,t1,t2,_eventCount);
fireIndexingEvent(evt);
try{
- String newVersion = _idxMgr.getCurrentDiskVersion();
- if (currentVersion==null || !currentVersion.equals(newVersion)){
- fireNewVersionEvent(newVersion);
+ String oldVersion = _idxMgr.getCurrentDiskVersion();
+ if (currentVersion!=null && !currentVersion.equals(oldVersion)){
+ fireNewVersionEvent(currentVersion);
}
}
catch(IOException ioe){
Please sign in to comment.
Something went wrong with that request. Please try again.