fix computing took for write operation result

This commit is contained in:
Areek Zillur 2016-10-25 10:42:09 -04:00
parent 7a6f56a692
commit c237263ad1
1 changed files with 2 additions and 2 deletions

View File

@ -549,7 +549,7 @@ public class InternalEngine extends Engine {
} }
versionMap.putUnderLock(index.uid().bytes(), new VersionValue(updatedVersion)); versionMap.putUnderLock(index.uid().bytes(), new VersionValue(updatedVersion));
indexResult.setLocation(location); indexResult.setLocation(location);
indexResult.setTook(index.startTime() - System.nanoTime()); indexResult.setTook(System.nanoTime() - index.startTime());
indexResult.freeze(); indexResult.freeze();
return indexResult; return indexResult;
} }
@ -632,7 +632,7 @@ public class InternalEngine extends Engine {
versionMap.putUnderLock(delete.uid().bytes(), versionMap.putUnderLock(delete.uid().bytes(),
new DeleteVersionValue(updatedVersion, engineConfig.getThreadPool().estimatedTimeInMillis())); new DeleteVersionValue(updatedVersion, engineConfig.getThreadPool().estimatedTimeInMillis()));
deleteResult.setLocation(location); deleteResult.setLocation(location);
deleteResult.setTook(delete.startTime() - System.nanoTime()); deleteResult.setTook(System.nanoTime() - delete.startTime());
deleteResult.freeze(); deleteResult.freeze();
return deleteResult; return deleteResult;
} }