← Back to team overview

graphite-dev team mailing list archive

Re: [Question #228472]: DESTINATIONS vs CARBONLINK_HOSTS in a cluster

 

Question #228472 on Graphite changed:
https://answers.launchpad.net/graphite/+question/228472

Igor K posted a new comment:
Hello, Xavier

>3) In both cases, merge the results with CARBONLINK_HOSTS (carbon-cache
cached-hot data) queried using ConsistentHashing.

Looks like merge only take place when data fetched locally from
DATA_DIRS, not through remote webapp (at least this is what I can see
for version 0.9.12) - mergeResults called only if dbFile.isLocal() :

# Data retrieval API
def fetchData(requestContext, pathExpr):
  seriesList = []
  startTime = requestContext['startTime']
  endTime = requestContext['endTime']

  if requestContext['localOnly']:
    store = LOCAL_STORE
  else:
    store = STORE

  for dbFile in store.find(pathExpr):
    log.metric_access(dbFile.metric_path)
    dbResults = dbFile.fetch( timestamp(startTime), timestamp(endTime) )
    results = dbResults

    if dbFile.isLocal():
      try:
        cachedResults = CarbonLink.query(dbFile.real_metric)
        results = mergeResults(dbResults, cachedResults)
      except:
        log.exception()

    if not results:
      continue

    (timeInfo,values) = results
    (start,end,step) = timeInfo
    series = TimeSeries(dbFile.metric_path, start, end, step, values)
    series.pathExpression = pathExpr #hack to pass expressions through to render functions
    seriesList.append(series)

  return seriesList

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.