Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #9 from slackhappy/new_hypertable_api

hypertable: easier invalidation of indexht file
  • Loading branch information...
commit 5427e5596ca866f5ff7f36dba48c5c4ef011e012 2 parents 7ab9982 + c90f81b
John Gallagher slackhappy authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 webapp/graphite/metrics/hypertable_search.py
8 webapp/graphite/metrics/hypertable_search.py
View
@@ -31,11 +31,15 @@ def __init__(self):
def _loadFromFile(self):
if os.path.exists(self.index_path):
s = time.time()
- self.last_atime = int(os.path.getmtime(self.index_path)) * 10**9L
fh = open(self.index_path)
+ has_lines = False
for l in fh:
- self._add(l.strip())
+ if l.strip():
+ self._add(l.strip())
+ has_lines = True
fh.close()
+ if has_lines:
+ self.last_atime = int(os.path.getmtime(self.index_path)) * 10**9L
log.info("[HyperIndex] initial load took %.6f seconds" % (time.time() - s))
Please sign in to comment.
Something went wrong with that request. Please try again.