fastannotate: do not cache lastnode

Summary:
When the server was handling a "getannotate" request, it may read lastnode,
update the revmap, then read lastnode again. So lastnode should not be cached.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, ikostia

Reviewed By: ikostia

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4327046

Signature: t1:4327046:1481904335:2a236091b5d36872df5703e4bb9f3651012a2f02
This commit is contained in:
Jun Wu 2016-12-14 16:45:55 +00:00
parent 9fe5387619
commit 9a67f6b7f1

View File

@ -203,7 +203,7 @@ class _annotatecontext(object):
self._node2path.clear()
_unlinkpaths([self.revmappath, self.linelogpath])
@util.propertycache
@property
def lastnode(self):
"""return last node in revmap, or None if revmap is empty"""
if self._revmap is None: