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