Skip to content

Commit

Permalink
in the case version does not comes in sequence. set the currentVersio…
Browse files Browse the repository at this point in the history
…n to be max version

Conflicts:

	sensei-core/src/main/java/com/senseidb/indexing/DefaultStreamingIndexingManager.java
  • Loading branch information
Lei Ni authored and Terence Yim committed Aug 31, 2012
1 parent 496819d commit c86588a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,12 @@ public void consume(Collection<proj.zoie.api.DataConsumer.DataEvent<JSONObject>>
if (obj == null) // Just ignore this event.
continue;

_currentVersion = dataEvt.getVersion();
String version = dataEvt.getVersion();
_currentVersion = (_versionComparator.compare(_currentVersion, version) < 0) ? version : _currentVersion;
if (pluggableSearchEngineManager != null && pluggableSearchEngineManager.acceptEventsForAllPartitions()) {
obj = pluggableSearchEngineManager.update(obj, _currentVersion);
}

int routeToPart = _shardingStrategy.caculateShard(_maxPartitionId, obj);
Collection<DataEvent<JSONObject>> partDataSet = _dataCollectorMap.get(routeToPart);
if (partDataSet != null)
Expand Down

0 comments on commit c86588a

Please sign in to comment.