Permalink
Browse files

in the case version does not comes in sequence. set the currentVersio…

…n to be max version
  • Loading branch information...
1 parent d926ca5 commit 1593da13c1aed9fb53c20773cb6c1f46a0712eb7 Lei Ni committed Aug 28, 2012
@@ -313,7 +313,8 @@ public void consume(Collection<com.linkedin.zoie.api.DataConsumer.DataEvent<JSON
if (obj == null) // Just ignore this event.
continue;
- _currentVersion = dataEvt.getVersion();
+ String version = dataEvt.getVersion();
+ _currentVersion = (_versionComparator.compare(_currentVersion, version) < 0) ? version : _currentVersion;
int routeToPart = _shardingStrategy.caculateShard(_maxPartitionId, obj);
Collection<DataEvent<JSONObject>> partDataSet = _dataCollectorMap.get(routeToPart);

0 comments on commit 1593da1

Please sign in to comment.